I am learning python and when running this simple guessing program I get an error at guess=int(input('Enter an integer: ')) Running Python 3 because the book is based on this version. Thanks in advance!
number = 23
running = True
while running:
guess = int(input('Enter an integer: '))
if guess == number:
print('Congratulations')
running = False
elif guess < number:
print('No higher!')
else:
print('Little lower!')
else:
print('while loop is over.')
print('done')
The error:
Enter an integer: Traceback (most recent call last):
File "../Documents/Python Programs/while.py", line 5, in <module>
guess = int(input('Enter an integer: '))
EOFError: EOF when reading a line
[Finished in 0.1s with exit code 1]