0
What mean this error?
EOFError: EOF when reading a line
6 Respostas
+ 7
Show the code please
+ 7
If you run it in Sololearn, you have to provide all the needed input at once, as the program only asks you once for it -- before executing the code.
You provide the input in separate lines, like this:
5
/
9
>>> (the output will be)
0.55555
+ 4
It means the interpreter expected yet something in your code and didn't find it :)
Perhaps an open parenthesis?
+ 1
No parentheses are closed
+ 1
num1 = float(input("Enter first number: "))
operator = input("Enter operator: ")
num2 = float(input("Enter second number: "))
if operator == "+":
print(num1 + num2)
elif operator == "-":
print(num1 - num2)
elif operator == "/":
print(num1 / num2)
elif operator == "*":
print(num1 * num2)
else:
print("Invalid operator")
+ 1
ok, Thanks