Why More than one input produces an error? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why More than one input produces an error?

I'm reading the SoloLearn Python tutorial and, like many others, i'm having trouble with this because an EOF error is producing when i run the code. I couldn't find an answer in the comments. It appearently works for many people and not for many others. This is the lesson: https://www.sololearn.com/learn/Python/2426/ And this is my code: s= input('Name: ') print(s) t= input('Age: ') print(t) u= input('Country: ') print(u) How can i fix this? What is the right way to do it?

12th Jan 2020, 12:51 PM
Javier Ballesteros
Javier Ballesteros - avatar
3 Answers
+ 10
The code seems perfect. But here the problem may be the input. If using Sololearn Code Playground then you need to give all the input at once. You can refer the below tutorial to understand this : https://code.sololearn.com/WhiNb9BkJUVC/?ref=app
12th Jan 2020, 12:56 PM
Nova
Nova - avatar
+ 6
check how many inputs are there in the code and enter each input in a new line. if for example you want to enter 1 2 3 1 2 3 submit. sololearn takes all the inputs at once and returns the output. you do not get to interact with their real terminal/console.
12th Jan 2020, 12:55 PM
Bahhaⵣ
Bahhaⵣ - avatar
+ 4
I get it now. Thanks to both!
30th Jan 2020, 10:51 PM
Javier Ballesteros
Javier Ballesteros - avatar