Answer the question
In order to leave comments, you need to log in
How to fix EOFError: EOF when reading a line?
My task is to calculate the sum of even numbers of the number entered by the user. Here is my code:
x = int(input())
while x > 0:
if( (x % 10) // 2 == True):
x += x
x = int(input())
print(x)
Throws an error :
Traceback (most recent call last):
File "jailed_code", line 6, in
x = int(input())
EOFError: EOF when reading a line
What did I do wrong?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question