File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ """
2+ This program made by Joe
3+ """
4+ total_balance = 1000
5+ min_bank = - 0
6+ codehs_compiler_cant_underrstand_loops = 0
7+
8+ while codehs_compiler_cant_underrstand_loops < 20 :
9+ user_input = input ("deposit or withdrawal? " )
10+ if user_input == "deposit" :
11+ print ("Your current balance is $" + str (total_balance ))
12+ total_balance = total_balance + int (input ("How much to deposit? " ))
13+ print ("Your current balance is now $" + str (total_balance ))
14+ elif user_input == "withdrawal" :
15+ print ("Your current balance is $" + str (total_balance ))
16+ temp_balance = int (input ("How much to withdrawal? " ))
17+ if total_balance - temp_balance <= min_bank :
18+ print ("You cannot have a negative balance!" )
19+ else :
20+ total_balance = total_balance - temp_balance
21+ print ("Your current balance is now $" + str (total_balance ))
22+ else :
23+ print ("Invalid transaction" )
24+ codehs_compiler_cant_underrstand_loops = codehs_compiler_cant_underrstand_loops + 1
You can’t perform that action at this time.
0 commit comments