0
I am getting an EOFError in my code.
I am writing a program to get the user to input some number and count from 1 to that number and print the same. Its pretty simple and I am using a function to do this. My code is as follows; def hide_and_seek(count): for i in range(1, count+1): print(i) print("Ready or not, here I come!") count = int(input("Enter the count:")) hide_and_seek(count) But I am getting error in the statement "count = int(input("Enter the count:"))" Please help. Thanks.
5 Antworten
+ 2
The parentheses might remained open in some of your line.Check once.
+ 2
First take input and then convert into int type.
+ 2
No error for me...!
Nethra Gurumurthy
Are you not giving any input?
Input a number in the pop-up..
+ 2
Take all input at the begining, then manage it in your code
+ 1
Thank you everyone. I was trying this code in a sandbox environment and I guess there is some issue with that. I tried the same code in PYthon IDle and it did work fine. Thanks for your answers.