Your own while / else


#1

https://www.codecademy.com/courses/learn-python/lessons/loops/exercises/your-own-while--else?action=resume

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!"    
    break
  else:
    guesses_left -= 1
else: 
    print 'You lose.'>

#2

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


#3

I refreshed the page and I get again the same message


#4

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


#5

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