( 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
© 2025 OneMinuteCode. All rights reserved.