I'm working through a beginners python tutorial and i'm attempting to do a little bit more than the tutorial asks for by adding conditions to the options
elif option == "2":
print "Choose a number for opt 2"
var_in = raw_input("> ")
if 0 < var_in < 5 or 1 <= var_in < 5:
print "between 1-5"
elif var_in == "0": #works
print "Zero"
else:
print "Greater than 5!" #works
If i enter anything other than 0 for var_in i get the message "Greater than 5!".
I also tried using:
elif option == "2":
print "Choose a number for opt 2"
var_in = raw_input("> ")
if var_in in range(1, 5):
print "between 1-5"
elif var_in == "0": #works
print "Zero"
else:
print "Greater than 5!" #works
Which had the same results as above.
Any assistance would be much appreciated. Thanks!