OneCompiler

i keep recieving this error, "timeout 7 python3 main.py"

here is my code:
import os
a = 1
soccer = 0
football = 0
tenis = 0
basketball = 0
volleyball = 0
baseball = 0
other = 0
while a == 1:
print ('what is your favorite sport')
b = input('')
if b == 'football':
football = football + 1
if b == 'tenis':
tenis = tenis + 1
if b == 'basketball':
basketball = basketball + 1
if b == 'volleyball':
volleyball = volleyball + 1
if b == 'baseball':
baseball = baseball + 1
if b == 'other':
other = other + 1
os.system('clear')

and no matter what I do, it just returns this message, "Error: Command failed: timeout 7 python3 main.py"

1 Answer

2 years ago by

You probably missing the STDIN to the program

2 years ago by OneCompiler