Tell us what’s happening:
I need help please, 20 and 22 keep not working.
I’ve been trying a bunch, hence my code has become very chaotic.
I believe something might out-rank the elif function and writes over it (kinda like <h1> would be of higher rank than <article> in html&css).
I really want to know what exactly is wrong with my code and couldn’t find any problem like it on the forum.
(I’ve been stuck on this for quite the while so maybe I just got stupid-brain by now…)
Your code so far
distance_mi = 7
is_raining = False
has_bike = False
has_car = False
has_ride_share_app = True
if distance_mi == True:
if distance_mi <= 1 and is_raining == False:
print('True')
else:
print('False')
elif (distance_mi > 1 and distance_mi <= 6) or distance_mi > 6:
if is_raining == False and has_bike == True:
print('True')
elif is_raining == True or has_bike == False:
print('False')
elif distance_mi <= 1 and is_raining == False:
print('True')
elif distance_mi > 6:
if has_ride_share_app == True:
print('True')
elif has_ride_share_app == False:
print('False')
elif has_car == False:
print('False')
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/142.0.0.0 Safari/537.36 OPR/126.0.0.0
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner