0
Help me fix elf error in calculator!
if user_input == "-": num3 = float(input("Enter a number: ")) num4 = float(input("Enter another number: ")) result2 = str(num3 - num4) print("The result is: " + result2) ThIS CODE prOducES eOF ERROR. HELPP!
6 Réponses
+ 3
Without having the complete code linked here, it is only a guess what and why it happens. It would be great if you could help us. Thanks!
+ 1
the code playground says:
Traceback (most recent call last):
File "./Playground/file0.py", line 9, in <module>
num1 = float(input("Enter a number: "))
EOFError: EOF when reading a line
+ 1
what are you enter in the input
0
i entered:
if user_input == "-":
num3 = float(input("Enter a number: "))
num4 = float(input("Enter another number: "))
result2 = str(num3 - num4)
print("The result is: " + result2)
ThIS CODE prOducES eOF ERROR. HELPP!
0
Because sololearn doesn't allow interactive input, try it on an online compiler like online gdb or programmerswiz
0
oh... ok TYSM i fixed it :D