Tell us what’s happening:
I’m unsure of where the logic is breaking down. no matter what value distance_mi has, I get False as the output. It says 21 and 23 aren’t there, but I have them formatted the same way as everything else that has worked up to this point. Any feedback is appreciated! When I add ‘’‘else: print(False)’‘’ it fails every step.
Your code so far
distance_mi = 7
is_raining = False
has_bike = False
has_car = True
has_ride_share_app = True
if distance_mi == 0:
print(False)
elif distance_mi <= 1 and is_raining == False:
print(True)
elif distance_mi <= 1 and is_raining == True:
print(False)
elif distance_mi > 1 <= 6 and has_bike == True and is_raining == False:
print(True)
elif distance_mi > 1 <= 6 and has_bike == False and is_raining == False:
print(False)
elif distance_mi >1 <= 6 and has_bike == False and is_raining == True:
print(False)
elif distance_mi > 6 and has_car == False and has_ride_share_app == False:
print(False)
elif distance_mi > 6 and has_car == True and has_ride_share_app == True:
print(True)
elif distance_mi > 6 and has_car == False and has_ride_share_app == True:
print(True)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 Edg/147.0.0.0
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner