Tell us what’s happening:
The program is reading everything as correct but the number 15. If I’m changing/checking anything with distance_mi being falsy, the entire check list becomes wrong so I’m stuck.
Also, I don’t understand why boolean has_car = false (has no car) reads the chain has_car != False as ‘has a car’ when it should be ‘has no car is true’ or am I misunderstanding something?
Your code so far
distance_mi = 0
is_raining = True
has_bike = True
has_car = False
has_ride_share_app = True
if distance_mi == False:
print (False)
if distance_mi <=1:
if is_raining != True:
print (True)
else:
print (False)
if distance_mi >1 and distance_mi <=6:
if has_bike != True and is_raining:
print (False)
elif is_raining != True and has_bike:
print (True)
else:
print (False)
if distance_mi >6:
if has_ride_share_app or has_car !=False:
print (True)
else:
print (False)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner