Debugging help needed: what is my syntax error?


#1



https://www.codecademy.com/courses/python-beginner-en-cxMGf/0/8?curriculum_id=4f89dab3d788890003000096

here is my code:


rom 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("What is your guess? Enter here:")
    if guess == random_number:
        print 'You win!'
        break
    guesses_left -= 1

else:
    print 'You lose.'

The error message is "Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: invalid syntax (python, line 10)"

Thanks!


#2

A copy and paste errir, Missing the f on the first line of code.


#3

ooops. you are right, it is a copy and paste error. But what is wrong aside from that?


#4

Missing close parens.


#5

ohmy i'm so embarrassed :stuck_out_tongue: thanks a lot!


#6

Hope you don't mind I took it one step at a time.


#7

of course not :stuck_out_tongue: thanks for bothering with such silly errors haha


#8

I know that the community is watching out, so wish to leave room for them to participate. My responses don't always point to all the problems, just one, and hopefully the one that once out of the way will give a chance to see the real problem.


#9

A true moderator indeed. I am inspired by your spirit!


#10

And according to the team, another Chuck Norris. "Kickin'
aws (sic) and takin' numbers".