( elif num == 2: ^ SyntaxError: invalid syntax) It pops up like this and there is a red mark on this part, so how do I solve it?
money = 0
while True:
num = int (input ("select the menu :"))
if num == 1:
money2 = int (input ("deposit amount :"))
money = money + money2
elif num == 2:
money3 = int(input("withdrawal :"))
while money3 > money:
money3 =int(intput)
money3 = int (input ("withdrawal :"))
money = money - money3
elif num ==3:
print("Balance :", money)
elif num == 4:
print ("End of Program")
break
Indentation is very important in Python. Pay attention to this.
money = 0
while True:
num = int (input ("select the menu :"))
if num == 1:
money2 = int (input ("deposit amount :"))
money = money + money2
elif num == 2:
money3 = int(input("withdrawal :"))
while money3 > money:
money3 =int(intput)
money3 = int (input ("withdrawal :"))
money = money - money3
elif num ==3:
print("Balance :", money)
elif num == 4:
print ("End of Program")
break
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
578 Understanding How to Configure Google API Key
915 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.