Basically, I want to be able to have an input where if a number is between 2 numbers, such as if a number is between 2-8 , it prints "Confirmed.", So if the input is 4,5,6,7 or 8 it will do that.
I've tried this code only, because I couldn't think of anything else.
if Distance > 1 and < 9:
print("You should ride your bike.")
I want it to print out "You should ride your bike" if the inputted number is between 2 and 8.
You have to do:
if 1 < Distance < 9:
print("You should ride your bike.")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With