Tell us what’s happening:
Please help me check my code, it say that:
“When the distance is between 1 mile (excluded) and 6 miles (included), and it is raining with no bike, the program should print False.”
Your code so far
distance_mi = 6
is_raining = False
has_bike = True
has_car = True
has_ride_share_app = False
distance_check = bool(distance_mi)
if distance_check == False:
print('False')
else:
if distance_mi > 6 and has_ride_share_app or has_car:
print('True')
elif distance_mi > 1 and has_bike and not is_raining:
print("True")
elif distance_mi <= 1 and not is_raining:
print('True')
else:
print('False')
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner