+ 1
Guys, please help me fix the error in my simple code. It returns EOF Error. I don't know what it is!
6 Antworten
+ 4
While True means it will keep asking for user input unless there is some condition that helps break out of loop ,so when does it do that?
so in the last elif statement add break if the user enters less than 1600 while loop won't ask for further inputs or you can add break however you want it to be
Also in sololearn you need to give all inputs at once.
+ 4
sololearn doesnt take input like a normal terminal would do, you have to provide ALL the inputs in the starting prompt itself. The code is fine and it should run well on a normal terminal. I guess you are providing a single input to check if the ValueError except block.
So after the first input returns a ValueError, it looks for a second input but it cant find any and returns an EOFError
+ 3
Bunyod Abdusaidov the prompt wouldn't have your input string, it will only get displayed on your console.
And you can see the input string on the console after running it.
+ 2
Bunyod Abdusaidov did you mean the year isnt displayed in the console?
i cant understand what you said
0
Thanks, it somehow didn't give an error. But, why my custom input which asks the user to enter a year is not displayed when I run the code? What should I do?
0
No, not year. The code should asks the user the year which the user wants to know the century of. It should display an input asking "Enter a year", but it doesn't!?