Tell us what’s happening:
Failing on steps 16, 18, and 19, and 20, yet when I plug the appropriate variables in for the program to run, the console prints what the check wants it to. I’m a little confused, any ideas as to why this isn’t passing?
Thanks so much for anyone who can help!
Specifically, the tests are:
Failed: 16. When the distance is 1 mile or less and it is not raining, the program should print True.
Failed: 18. When the distance is between 1 mile (excluded) and 6 miles (included), and it is raining with no bike, the program should print False.
Failed: 19. When the distance is between 1 mile (excluded) and 6 miles (included), it is not raining but no bike is available, the program should print False.
Failed: 20. 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.
Your code so far
distance_mi = 5
is_raining = True
has_bike = False
has_car = False
has_ride_share_app = False
go = True
if distance_mi:
if has_car or has_ride_share_app:
pass
elif is_raining:
go = False
elif distance_mi <= 1:
pass
elif distance_mi > 1 and distance_mi <= 6 and has_bike:
pass
else:
go = False
else:
go = False
print(go)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:149.0) Gecko/20100101 Firefox/149.0
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner