0

Please help, what's wrong with me I input the ff but it shows an EOF error in the last line

s = input("my name is: Getahun") print(s) t = input ("my age is : 29") print (t) k = input ("my hobby is : \n reading novels ") print (k)

1st Dec 2019, 7:47 AM
getahun walelign
7 odpowiedzi
+ 2
I think you are not taking input properly. Take input like this. AJ 29 Coding
1st Dec 2019, 7:55 AM
A͢J
A͢J - avatar
+ 1
Write code in Sololearn Playground and share the link here. And also update tag with language in your question.
1st Dec 2019, 7:52 AM
A͢J
A͢J - avatar
+ 1
There is nothing Wrong in your code. Problem is in how you are taking input. In Sololearn you should take multiple input at the same time like above I told you.
1st Dec 2019, 7:57 AM
A͢J
A͢J - avatar
0
s = input("my name is: Getahun") print(s) t = input ("my age is : 35") print (t) k = input ("my hobby is : reading novels ") print (k) My inputs were as shown above but it displays EOF error on the last line when I run it. What's wrong with me help please
1st Dec 2019, 7:56 AM
getahun walelign
0
Your input doesn't go inside the string in the input function. You enter it after you run the program. That's why you are getting an End Of File (EOF) Error - you didn't actually give the program any inputs so it has nothing to print.
3rd Dec 2019, 12:17 AM
Njeri
Njeri - avatar
0
Sorry please, it is okay for first two lines, I.e. prints out Getahun 35 But not input k= input("my hobby is: reading novels") In this case shows EOF error
3rd Dec 2019, 2:48 AM
getahun walelign
0
I wrote and ran that code in the Code Playground to check. It isn't really OK for those lines. It shows them because they are part of the input prompt, not because they are inputs. That is not proper use of the input function. This is what you should do to fix the issue: s = input("my name is:") print(s) t = input("my age is:") print(t) k = input("my hobby is:") print(k) Then click "Run". When the program shows the box that prompts for input, write: Getahun 29 Reading novels and click "Submit".
3rd Dec 2019, 7:40 AM
Njeri
Njeri - avatar