I know this question has been asked before, but they do not seem to be working for me. I would like if someone could tell me why this else statement has been giving me a syntax error.
def entrance():
print "You wake up in a dark cave. There isn't enough light to see anything."
print "Would you like to move forward anyway?"
next = raw_input("> ")
if next.lower() == "yes":
print "Your feet touch something upon the floor"
print "\nA FLASHLIGHT! And it still has full battery!"
elif next.lower() == "no":
print "So you just stand there....for days. And without any light or way back."
print "It was only a matter of time before you starved to death anyway. So you convince yourself to give up."
print "I guess that's easier then actually trying right?"
print "\nGAME OVER"
exit(0)
else: #THIS IS THE ONE!
print "I'm sorry, I don't understand this command"
entrance()
Aucun commentaire:
Enregistrer un commentaire