I keep getting EOFError even when it works on other code editors? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I keep getting EOFError even when it works on other code editors?

Age = input("can you tell me your age") print(" ") Name = input(can you also give me your name?) print("your age is "+str(Age)+" and your name is "+name EOFERROR

4th Feb 2024, 1:43 AM
Ponderlius
Ponderlius - avatar
4 Answers
+ 7
The input is here not interactive thus you have to enter all inputs data at the beginning as follows: 19 aName
4th Feb 2024, 1:54 AM
JaScript
JaScript - avatar
+ 1
Thank you JaScript
4th Feb 2024, 3:45 AM
Ponderlius
Ponderlius - avatar
+ 1
EOFError is due to a missing parenthesis in line 4. print("your age is " + str(Age) + " and your name is " + name) Edit: If you want to add a new line, you can append a "\n" to any string.
4th Feb 2024, 6:54 PM
Jordan Mock
Jordan Mock - avatar
0
In the input with Name, you don't put the ".
5th Feb 2024, 6:36 AM
Tasha Clipartino
Tasha Clipartino - avatar