0

why my calculator is wrong

this is the code while True : print("enter add") user=input("goo") if user ="add" num1=float(input("first number")) num2=float(input("2nd number")) rese=num1+num2 print (rese)

3rd Jul 2016, 3:23 PM
yosef
2 Réponses
+ 3
Use identation for if constructs. When writing code for a construct, add 4 spaces before each statement. Don't forget the colon after the condition. If user == "add": code code code etc
3rd Jul 2016, 3:40 PM
Gershon Fosu
Gershon Fosu - avatar
0
ooooooooh i forgot it thanks alot
3rd Jul 2016, 3:41 PM
yosef