I keep getting this error code in my calculator code. What does it mean and how do I fix it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I keep getting this error code in my calculator code. What does it mean and how do I fix it?

File "..\Playground\", line 13, in <module> num1 = float(input("Enter a number: ")) EOFError: EOF when reading a line

12th Nov 2019, 12:06 AM
Isaac Valdes
Isaac Valdes - avatar
5 Answers
+ 2
OK, remove the while loop, it doesn't work well here, since it requires you to continuously insert a user_input (I don't think sololearn supports that). Now when you want to run it, insert each character in different line. Example Add 5 6 It works well this way
12th Nov 2019, 8:06 AM
Fabian Nwobi
Fabian Nwobi - avatar
+ 1
Did you input into the submit mask? (You have to do that if you take input.)
12th Nov 2019, 12:19 AM
HonFu
HonFu - avatar
+ 1
Don't worry... Run your code in QPython or Pydroid3 (on Android) or PyCharm (PC based), it will work fine... No error as such occurs!! (SoloLearn doesn't support interactive inputs) Happy Coding ◉‿◉
12th Nov 2019, 11:05 AM
Stravo1
Stravo1 - avatar
0
Yes. But it only asked me for input once. It was supposed to ask at least for 3 different inputs. Here's the code. https://code.sololearn.com/cg0EHQ1yKsKC/?ref=app
12th Nov 2019, 1:32 AM
Isaac Valdes
Isaac Valdes - avatar
0
Thanks
12th Nov 2019, 2:31 PM
Isaac Valdes
Isaac Valdes - avatar