I'm taking a python course on codecademy at the moment and decided to try run a simple program on my computer from the terminal.
I created a basic program based on simple if, elif, else statements, really simple code as I'm trying to reinforce the basics that I'm learning, the goal is to form a response, if you have more than 49 credits, you get a congratulatory response and so forth...
firstName = raw_input("Enter your first name: ")
lastName = raw_input("Enter your last name: ")
excellenceCredits = raw_input("Enter the amount of excellence credits
you have so far: ")
if excellenceCredits > 49 and len(firstName) >= 10:
print "Well done " + firstName + " " + lastName + " on the
excellence endorsement, feel proud! You also have an impressive long
name!"
elif excellenceCredits > 49 and len(firstName) < 10:
print "Well done " + firstName + " " + lastName + " on the
excellence endorsement, feel proud!"
elif excellenceCredits < 50 and excellenceCredits > 40:
print "So close " + firstName + ", better luck next time, I bet
the " + lastName + "s are so proud of you!"
else:
print "Keep working hard, you never know what's around the corner..."
The problem is whenever I run the program from the terminal and enter an excellenceCredits value less than 50, it still prints the wrong response, this is probably really simple, but I just can't see whats wrong with the code.