[Tutor] invalid syntax (reply)

Corey Richardson kb1pkl at aim.com
Thu Sep 24 23:43:24 CEST 2009


Robert, that is my code. The error? "Theres an error in your program : 
invalid syntax"
Closing the parenthesis helped that one, but my else statement is not 
working...heres the code chunk...
if wellness != "Good":
    elif wellness != "Well":
        elif 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? :")
fatness = raw_input("How many candies do you want to eat? :")
if fatness > 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", 
fatness, "lbs overweight"



my IDLE highlights the print, in each of them. Why? (oh, and thanks for 
helping, all)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kb1pkl.vcf
Type: text/x-vcard
Size: 55 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20090924/28120a83/attachment.vcf>


More information about the Tutor mailing list