File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,10 @@ while True:
101101print (total)
102102```
103103-----------------
104- ** Solution by: leonedott **
104+
105105``` python
106+ ''' Solution by: leonedott'''
107+
106108lst = []
107109while True :
108110 x = input ()
@@ -118,6 +120,25 @@ for item in lst:
118120 balance -= int (item.strip(' W ' ))
119121print (balance)
120122```
123+ ------------------------
124+ ``` python
125+ ''' Solution by: AlexanderSro'''
126+
127+ account = 0
128+ while True :
129+ action = input (" Deposit/Whitdrow/Balance/Quit? D/W/B/Q: " ).lower()
130+ if action == " d" :
131+ deposit = input (" How much would you like to deposit? " )
132+ account = account + int (deposit)
133+ elif action == " w" :
134+ withdrow = input (" How much would you like to withdrow? " )
135+ account = account - int (withdrow)
136+ elif action == " b" :
137+ print (account)
138+ else :
139+ quit ()
140+ ```
141+ -----------------
121142
122143[ *** go to previous day*** ] ( https://github.com/darkprinx/100-plus-Python-programming-exercises-extended/blob/master/Status/Day%204.md " Day 4 ")
123144
You can’t perform that action at this time.
0 commit comments