fork download
  1. import random
  2. x = random.randrange(10) + 1
  3. y = ''
  4. count = 0
  5. while y != x:
  6. y = int(raw_input('I\'ve picked a number. Make a guess!\n'))
  7. print 'Wrong guess!'
  8. count += 1
  9. print count
  10. raw_input('\n\nP')
Runtime error #stdin #stdout #stderr 0.02s 10040KB
stdin
6
stdout
I've picked a number. Make a guess!
Wrong guess!
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