Error when running my code from code playground, but not from local IDLE. Please Help!
Hi all, I am trying to add new code to 'My Codes', but when I run the code I get the following error; Guess my number 1-20: Too low, try again: Traceback (most recent call last): File "./Playground/file0.py", line 8, in <module> guess=input() EOFError: EOF when reading a line The code is as follows; import random num=random.randint(1,20) flag=True guess=0 print('Guess my number 1-20: ',end='') while flag == True: guess=input() if not guess.isdigit(): print('Invalid! Enter only digits 1-20') break elif int(guess) < num: print('Too low, try again:', end='') elif int(guess) > num: print('Too high, try again:', end='') else: print('Correct... My number is ' + guess) flag=False I have run this locally in IDLE 3.8 and it works, so I can only guess that it's due to the website and how it is saving/storing the code! Any ideas all, as I want to create a cool library of code for all to see! :)