Tell us what’s happening:
My code is not passing for the option to print True when distance is between 1 and 6, has a bike and is not raining.
And for the last one that the distance is greater than 6, no car nor has ride share app to print False and is not working.
Here is my code
Your code so far
distance_mi = 0
is_raining = True
has_bike = False
has_car = True
has_ride_share_app = False
if not distance_mi:
print("False")
elif distance_mi <= 1:
if not is_raining:
print("True")
else:
print("False")
elif distance_mi in range(2,7):
is_raining and has_bike
print("False")
elif distance_mi in range(2,7):
not is_raining and has_bike
print("False")
elif distance_mi in range(2,7):
not has_bike and not is_raining
print("True")
elif distance_mi > 6:
not has_ride_share_app and has_car
print("True")
else:
not has_car and has_ride_share_app
print("False")
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner