fork download
  1. import random
  2. x = random.randrange(10) + 1
  3. y = ''
  4. count = 0
  5. while True:
  6. y = int(raw_input('I\'ve picked a number. Make a guess!\n'))
  7. if y != x:
  8. print 'Wrong guess!'
  9. else:
  10. break
  11. count += 1
  12. print count
  13. raw_input('\n\nP')
Runtime error #stdin #stdout #stderr 0.02s 10088KB
stdin
Standard input is empty
stdout
I've picked a number. Make a guess!
stderr
Traceback (most recent call last):
  File "prog.py", line 6, in <module>
EOFError: EOF when reading a line