def restudy():
print "OK, since you decided to restudy at MIANYANG high school, you must work hard!"
print '''
Now, it's time to determine your destiny.
Please answer the questions below:
what's the result of 1+1?
if you give the right answer, you can go to Shanghai; but if you can't
you'll be caught in here forever.
'''
test = raw_input("> ")
if test == "2":
print "you succeed!"
shanghai()
else: # that's the error line
restudy()
И вот результат, который мне показывает терминал:
else:
^
SyntaxError: invalid syntax
в чем проблема с моим кодом? Потому что я думаю, что это кажется правильным.
надеюсь, кто-нибудь может мне помочь.
спасибо!