Your own while / else


I got this message:
Traceback (most recent call last):
File “python”, line 10, in
ValueError: invalid literal for int() with base 10: ‘SCT’

<from random import randint

# Generates a number from 1 through 10 inclusive
random_number = randint(1, 10)

guesses_left = 3

# Start your game!
while guesses_left > 0:
  guess = int(raw_input('Your guess: '))
  if guess == random_number:
    print "You win!"    
    guesses_left -= 1
    print 'You lose.'>


problem seems to fixed (whatever it was), refresh the page and try again


I refreshed the page and I get again the same message


other people got the same problem, and got it to work now. There is nothing i can do about this


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.