Tell us what’s happening:
This is my task: When the distance between 1(exculded) and 6(included) , a bike is availible, and it is not is_raining ,the program print “True”: alse my script is this: if …elif (1<distance_mi<=6 and has_bike and not is_raining: print(“True”). but it is return same error ;distance_mi=3,is_raining=True and finaly,if the distance between
- When the distance is between 1 mile (excluded) and 6 miles (included), a bike is available, and it is not raining, the program should print True.
Fail
Your code so far
distance_mi=23
is_raining =True
has_bike=True
has_car =True
has_ride_share_app =True
if not distance_mi:
print("False")
elif distance_mi<=1 and( not is_raining):
print("True")
elif distance_mi<=1 and is_raining:
print("False")
elif 1<distance_mi<=6 and (is_raining and not has_bike):
print("False")
elif (1<distance_mi<=6) and (not is_raining or not has_bike ):
print("False")
elif (1<distance_mi<=6) and not is_raining and has_bike:
print("True")
elif distance_mi>6 and has_ride_share_app:
print("True")
elif distance_mi>6 and has_car:
print("True")
elif distance>6 and not( has_car and has_ride_share_app):
print("False")
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner