Tell us what’s happening:
The program appears to be returning the expected True or False returns as I change the arbitrary values in the input variables. The issue is that only the tests that match the input variables passes; while their inverse appears to always fail. Example: Test 15 passes when I put (0.5 miles and False) while 16 fails with the same values. If I change them to (0.5 and True), then 16 passes and 15 fails. Thank you for your help!
Your code so far
# Required vars
distance_mi: float = 0.5
is_raining: bool = False
has_bike: bool = True
has_car: bool = True
has_ride_share_app: bool = True
# Usecase 4: False
if not distance_mi:
print(False)
# Usecase 5: True
elif distance_mi <= 1 and (not is_raining):
print(True)
# Usecase 6: True
elif 1 < distance_mi <= 6 and (not is_raining and has_bike):
print(True)
# Usecase 7: True
elif distance_mi > 6 and (has_car or has_ride_share_app):
print(True)
# If any of the other conditionals are not met: False
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