+ 1
I keep getting eof error in my output please help me know what's wrong
12 odpowiedzi
+ 2
Victor Okolie
You need to break at the end of each if and elif block.
The while loop is an infinite loop which needs to be broken out of, hence the reason while only quit will not bring EOFError.
EOFError means end of file error. The console reads your input and process every data supplied, after the third input, the loop still continues, but no more data to be used by the console, hence the EOFError.
https://code.sololearn.com/cyhDBB4eq9ZC/?ref=app
check this out
+ 3
add
2
3
quit
works perfectly
Which case makes problems ?
+ 3
You can't simply run codes that require interactive input in SoloLearn, it's rather tricky.
See this code to better understand how SoloLearn uses input 👇
https://code.sololearn.com/WhiNb9BkJUVC/?ref=app
+ 2
i get no eof with that data
+ 2
Victor Okolie it is not your device.
Last line of input must be quit.
+ 1
no your code is okay
when u run it, the last line of input must be quit
0
That eof error statement below in the output
I want it gone
0
Eof error displayed in line 12
0
You sure?....is it my device?😶
0
Like
If user_input=="quit":
Break
Should be the last code?
0
Same this popped up in the output