0

Help me please.

while True: print("Enter'+'to add two numbers") print("Enter'-'to subtract two numbers") print("Enter'*'to multiply two numbers") print("Enter'/'ti divide two numbers") print("Enter'quit'to end the programm") user_input=input("") if user_input=="quit": break elif user_input =="+": a=fload(input("Enter number:")) b=fload(input("Enter another number:")) print=str(a+b) break:outside loop

4th Jul 2017, 7:32 PM
Никита Пушкарёв
Никита Пушкарёв - avatar
3 Respuestas
+ 12
1. print( ) is not a variable, syntax is wrong. 2. "float" not "fload". You have to find an alternative way to break the program, i've some doubt you can break a program in runtime with Sololearn so i'm not the right person to do that, but i can fix your bugs. https://code.sololearn.com/cz0tzy2XMlZB/?ref=app
4th Jul 2017, 7:55 PM
Maz
Maz - avatar
+ 2
Indentation is very important while iterating in python. Indent your code carefully and datatype is float ..try this corrected code: https://code.sololearn.com/cVyfJGocsxC0
4th Jul 2017, 9:24 PM
Ashtuosh
Ashtuosh - avatar
+ 1
Thank you very much for your help
5th Jul 2017, 5:57 PM
Никита Пушкарёв
Никита Пушкарёв - avatar