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)
I think you are not taking input properly. Take input like this. AJ 29 Coding
Write code in Sololearn Playground and share the link here. And also update tag with language in your question.
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.
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
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.
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
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".