0
Why n in while loop are EOFError
Hi, I practice in topic of break in while loop and I write code for this: items = [] while True: n = int(input()) if n != 0 : items.append(n) else: break print(items) when I run this code. I got error n = int(input()) EOFError: EOF when reading a line I dont know why it error. Anyone can help me?
7 odpowiedzi
+ 5
The code is fine. Just remember that you have to input all numbers at once
+ 1
Why practice?
Input all numbers in the window like this
3
4
0
Then submit
+ 1
Which task is it in the course?
0
yeah, But in this this practice no anyone got the same problem, I try to copy code from other people and it not work, I got the same problem.
0
I can't input number by myself becuase I learn 'python core' it course in this app.
0
Infinite loop (task in pro user) in topic control structure
0
the code is working properly. may be it's the tool problem i mean IDLE interpreter problem. which IDLE you are using? please check the the tool you are using