What mean this error? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What mean this error?

EOFError: EOF when reading a line

22nd Jan 2019, 4:20 PM
Azra
Azra - avatar
6 Answers
+ 7
Show the code please
22nd Jan 2019, 8:16 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 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
22nd Jan 2019, 9:14 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 4
It means the interpreter expected yet something in your code and didn't find it :) Perhaps an open parenthesis?
22nd Jan 2019, 4:28 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 1
No parentheses are closed
22nd Jan 2019, 4:43 PM
Azra
Azra - avatar
+ 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")
22nd Jan 2019, 8:42 PM
Azra
Azra - avatar
+ 1
ok, Thanks
22nd Jan 2019, 9:32 PM
Azra
Azra - avatar