0
I did not change the code but it didn´t work
print(float(input("Enter a number: ")) + float(input("Enter another number: "))) Enter a number: Enter another number: Traceback (most recent call last): File "..\Playground\", line 1, in <module> \ufeffprint(float(input("Enter a number: ")) + float(input("Enter another number: "))) EOFError: EOF when reading a line
3 ответов
+ 2
print(float(input("Enter a number: ")) + float(input("Enter another number: ")))
This does work. Sololearn code playground has a broken input system. if your code calls for 2 or more inputs, you have to enter them all at the beginning.
run it again and try hitting enter after your first input to move down a line and add your second number.
input:
5
6
output:
11.0
+ 1
It would be nice if they would fix that. It would allow for a lot more interactive experiences.
0
it would. my hangman game works great, but here it is useless