P
P
proxor20012021-07-18 18:36:52
Python
proxor2001, 2021-07-18 18:36:52

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

1 answer(s)
S
soremix, 2021-07-18
@SoreMix

Does the code run in an online interpreter? If yes, then it may lead to an error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question