Tell us what’s happening:
Hi,
This code won’t pass step 15 (When the distance is 1 mile or less, and it is not raining, the program should print True.):
elif distance_mi <= 1 and not is_raining:
print(“True”)
It literally says so, but that’s not enough, obviously. I don’t get why.
Your code so far
distance_mi = 1
is_raining = False
has_bike = True
has_car = False
has_ride_share_app = True
if not isinstance(distance_mi, int):
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 has_bike and not is_raining:
print("True")
elif 1 < distance_mi <= 6 and not has_bike and not is_raining:
print("False")
elif not 1 < distance_mi > 6 and not has_bike and is_raining:
print("False")
elif distance_mi > 6 and has_car or has_ride_share_app:
print("True")
else:
print("False")
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner