+ 11

What is an EOF error in python?

24th Jun 2017, 5:42 AM
PlanetGK
PlanetGK - avatar
9 Antworten
+ 8
EOF stand for end Of File, in any computer context ^^ You could encounter an EOF error in Python, while try to get data from a stream (not necessarly a file) but the stream is ended (no more data provided)... Commonly, in code playground, this error occurs when your script have user input but you doesn't provide all user input at once at begining, as asking by the pop up box ;P
24th Jun 2017, 5:57 AM
visph
visph - avatar
+ 6
I don't have seen your link to your code when I posted... Your problem is the common one I described: your script work well if you give all entries at once, each separated by a new line at begin, like: add 38 4 quit
24th Jun 2017, 6:02 AM
visph
visph - avatar
+ 6
Thanks visph! The problem has been solved. It gave me the error because I wasn't putting quit at the end of the input. I ended up removing the loop so that is no longer a concern.
24th Jun 2017, 8:02 AM
PlanetGK
PlanetGK - avatar
+ 4
@Masquerade: Asker have posted a link to his code just before my first answer, and seems to have delete it since my second answer ;)
24th Jun 2017, 7:38 AM
visph
visph - avatar
+ 2
Visph is right on point, I believe you are getting the EOF error from your calculator code.
24th Jun 2017, 7:35 AM
Masquerade
Masquerade - avatar
+ 1
Please paste the exact error and show the code that caused it. Don't make us guess.
24th Jun 2017, 5:46 AM
Igor B
Igor B - avatar
+ 1
Your code will work just fine in any other interpreter but not code playground unless you provide all inputs at once separated by new lines.
24th Jun 2017, 7:38 AM
Masquerade
Masquerade - avatar
+ 1
oh I see..!
24th Jun 2017, 7:40 AM
Masquerade
Masquerade - avatar
0
Do we know if SoloLearn is working on a solution for multiple inputs sequentially? and not all in the beginning? I've just created a hangman game, which kinda defeats the purpose.. entering all letters of the alphabet in a multi line fashion before the game even kicked off?! :-/
9th Mar 2018, 12:40 PM
MrQ
MrQ - avatar