+ 3

This code does not work:

print(float(input("Enter a number: ")) + float(input("Enter another number: ")))

10th Mar 2017, 3:15 PM
Eduard Bedratyi
Eduard Bedratyi - avatar
5 Respuestas
+ 1
Both run into the IDLE. v.3.4 print(float(input("num3: ")) + float(input("num4: "))) v.2.7 print float(input("num3: ")) + float(input("num4: "))
20th Mar 2017, 8:50 AM
Etzel
Etzel - avatar
0
write in next line
10th Mar 2017, 3:21 PM
Raj Kumar Chauhan
Raj Kumar Chauhan - avatar
0
print(float(input("Enter a number: "))) print(float(input("Enter another number: ")))
10th Mar 2017, 5:26 PM
LordHill
LordHill - avatar
0
Don't know why Eduard Bedratyi's comment is disliked, he's right, code works if you enter numbers in two different lines when popup appears. Actually, that's what input box says. Thanks
15th Mar 2017, 5:19 PM
Lucky Light
Lucky Light - avatar
- 2
It is better if you enter "Enter" after 1st input, and enter "Submit" after 2nd input. Code works!
10th Mar 2017, 5:49 PM
Eduard Bedratyi
Eduard Bedratyi - avatar