From .... import .... syntax error


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/python-beginner-en-cxMGf/2/6?curriculum_id=4f89dab3d788890003000096

<In what way does your code behave incorrectly? Include ALL error messages.>
File “python”, line 2
from random import randint
^
SyntaxError: invalid syntax

<What do you expect to happen instead?>
Execute normally

```python

guess = int(raw_input("Guess your no. ")
from random import randint

for a in range(100):
r = randint(10)
if r == guess:
print r
break
else:
print “unfortunatly your are not lucky today”

<do not remove the three backticks above>

#2

look at line 1, pay close attention to the parentheses


#3

i expected that once user will guess a no. the program will randomly guess a no. a 100 times and if it completes the for loop it will execute the else statement…

MY CODE
guess = int(raw_input("Guess your no. ")
from random import randint

for a in range(100):
r = randint(10)
if r == guess:
print r
break
else:
print “unfortunatly your are not lucky today”


#4

idk what happens to with the indents i put


#5

you need to use format to make indent show on the forum:

well, if you forgot a parenthesis on line 1, python will throw an error


#6

OH! thanks!
i feel stupid now


#7