29th Nov 2023, 12:44 AM
NJOROGE ROBERT WACHIRA
2 Réponses
+ 3
There are few errors in your code. Line 5, it doesn't convert account from string to int. Instead it assigns 0 to account. Indentation of the if-else block is misplaced. You also need an exit condition, otherwise it will become an infinite loop. Line 4 isn't doing anything at all. Guess it was planned to do something else.
29th Nov 2023, 4:39 AM
Wong Hei Ming
Wong Hei Ming - avatar
+ 1
acc = input("enter amount \n") if int(acc) >= 10: print("deposited
quot; + str(acc)) else: print("minimum is $10")
29th Nov 2023, 2:55 PM
Angelo Abi Hanna
Angelo Abi Hanna - avatar