for more than a week i still can’t by pass this code/test 15. When the distance is 1 mile or less and it is not raining, the program should print True.
please help me
Your code so far
distance_mi = 1
is_raining = True
has_bike = True
has_car = False
has_ride_share_app = True
if distance_mi <= 1:
if is_raining == False:
print(True)
elif distance_mi <= 1 and is_raining:
print(False)
if distance_mi <= 6 and (is_raining and has_bike == False):
print(False)
elif distance_mi <= 6 and (is_raining == False and has_bike == False):
print(False)
elif distance_mi <= 6 and (has_bike and is_raining == False):
print(True)
elif distance_mi > 6 and has_ride_share_app:
print(True)
elif distance_mi > 6 and has_car == True:
print(True)
elif distance_mi > 6 and (has_car or has_ride_share_app == False):
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
This is all about reasoning and logic. If your code never reaches the elif, what can you change to make sure it does? We do not hand out solutions here, but we will guide you so you can figure it out yourself.
I am guiding you by telling you where to look for an issue and teaching you to use print() statements in your code so you can see what your conditions and variables are or even to see if the code reaches the print() statement.
Please don’t use ChatGPT; it’s against forum rules to use AI.