Tell us what’s happening:
By rigorous check I’ve come to find out that my code is actually printing 'False ’ when distance_mi is a falsy, but the test point 15 keeps scoring me wrong. What do I do? Leave it like that and move on? Please, guide. Thanks a lot.
Your code so far
distance_mi = 0
is_raining = False
has_bike = True
has_car = True
has_ride_share_app = True
if not distance_mi:
print('F')
if distance_mi <= 1 and is_raining == False:
print('True')
elif distance_mi <= 1 and is_raining == True:
print('False')
elif distance_mi <= 6 and (is_raining == True and has_bike == False):
print('False')
elif distance_mi <= 6 and (is_raining == False and has_bike == True):
print('True')
elif distance_mi > 6 and (has_car == True or
has_ride_share_app == True):
print('True')
else:
print('False')
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Mobile Safari/537.36
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner