[Tutor] Unknown reason for error.
Corey Richardson
kb1pkl at yahoo.com
Thu Sep 24 20:15:58 CEST 2009
Hello, python tutors, its Corey.
Anyway, I'm getting a syntax error for an unknown reason. Here is my code...
name = raw_input("What is your name?")
print "Hello, ", name
wellness = raw_input("How are you?")
if wellness != "Good":
if wellness != "Well":
if wellness != "Fine":
print "Oh, I'm sorry you are not feeling well. I guessed correct, right?"
else: print "Great!"
candyNumber = raw_input("How many candies do you want? :"
fat = raw_input("How many candies do you want to eat? :")
if fat > candyNumber:
print "HA! Nice try, but no. You don't have that many candies"
else print "HA! You ate the candy! Suckerrrrr. You are now", fat, "lbs overweight"
The syntax arror is at the first fat. Thanks ahead of time,
~Corey
More information about the Tutor
mailing list