0
How do i fix this EOF error?
I got to this python immediately practice and got stuck up. Here's the code and the error message its showing name_1 = input("Tom") name_2 = input("Bob") print(name_1) print(name_2) Here's the EOFE; _The error is caused by not providing an input for the "Bob" prompt _ Thee code is asking for input but not letting the user input anything
4 odpowiedzi
+ 2
the input name is variable – it is not a fixed value, it is entered by a virtual user.
store the input in one variable and then work with that one variable – not with multiple variables.
do not write anything in input(). No "Tom", no whatsoever.
+ 2
I recognize this exercise, it is Chatbot v1.0.
Just like Lisa said, consider you are the programmer, and the exercise itself is a user going to input the name.
When doing SoloLearn exercises you should always use "variable = input()".
Don't put any text inside the parentheses.
While it is valid to put text message inside the parentheses, this technique is not cover in SoloLearn and will cause trouble in exercises.
+ 1
Nasir Cheledi ,
Sololearn requires all inputs to be entered by the user before the program runs. It then doles out the inputs one line at a time to multiple input() statements in the code.
To enter multiple lines as the user, type a line, hit enter, type a line, hit enter, etc. Finally hit SUBMIT.
You were probably trying to enter multiple inputs on the same line, so the second input didn't receive anything.
+ 1
It appears to be a practice task from a sololearn course.
[edited]