Not sure how to formulate an answer to #15 and also 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.
Not sure how to find the way to expressing this in python code..
Your code so far
distance_mi = 0
is_raining = True
has_bike = True
has_car = False
has_ride_share_app = False
if distance_mi <=1 and is_raining !=True:
print(True)
elif distance_mi >=1 and distance_mi <=6 and has_bike:
print(True)
elif distance_mi >6 and has_car or has_ride_share_app:
print(True)
elif distance_mi==False:
print("False")
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner
Should you be trying to evaluate if distance_mi is falsy at the end of your code or at the beginning? And, sorry, I sent you an MDN link from the JavaScript reference, but the same falsy values should apply in Python.
I want to thank you for your guidance. I completed this short project - now lets go for the next challenge!
Following your advice, reading, taking a short break and reviewing with new eyes and trying around along with rereading the instructions made all the difference.
I come to appreciate why you are careful of leaving code out. Grind, grit and faith will lead one to the answer one seeks…