Dec-24-2017, 01:33 AM
Your problem is that the two if-statements are independent of each other. You're basically saying "if x <= 3 do something" then you say "if x >=8 then do another thing, otherwise do some third thing." It's subtle but you should notice that I intentionally grouped your if statements into two independent questions.
Take a look at this: https://docs.python.org/3/tutorial/contr...statements
Also, please put your code inside python tags so it gets nicely formatted.
this:
if x >= 3:
print("x is less than three")
Take a look at this: https://docs.python.org/3/tutorial/contr...statements
Also, please put your code inside python tags so it gets nicely formatted.
this:
if x >= 3: print("x is less than three")instead of:
if x >= 3:
print("x is less than three")