Tell us what’s happening:
I am try to solve the all problems by breaking the problems yeah it work but i think this is so much code i guess for this i think conditions can we improve in one line but yeah it work
Your code so far
distance_mi = 1
is_raining = True
has_bike = False
has_car = False
has_ride_share_app = False
if not distance_mi:
print(False)
elif distance_mi <= 1 and is_raining != True:
print(True)
elif distance_mi <= 1 and is_raining == True:
print(False)
elif distance_mi > 1 and distance_mi <=6 and (has_bike == True and is_raining != True):
print(True)
elif distance_mi > 1 and distance_mi <=6 and (has_bike == False and is_raining == True):
print(False)
elif distance_mi >6 and (has_car == True or has_ride_share_app == True):
print(True)
elif distance_mi >6 and (has_car != True and has_ride_share_app != True):
print(False)
else:
print(False)
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner