Tell us what’s happening:
I have done every point apart from number 15, but 16 is done so im a little confused how it doesn’t work. Any direction would be great
- When the distance is 1 mile or less and it is not raining, the program should print True.
Your code so far
distance_mi = 4
is_raining = False
has_bike = True
has_car = True
has_ride_share_app = False
if not isinstance(distance_mi, int):
print("False")
elif distance_mi <= 1:
if is_raining == False:
print("True")
else:
print("False")
elif 1 < distance_mi <= 6:
if has_bike and not is_raining:
print("True")
else:
print("False")
elif distance_mi > 6:
if has_car or has_ride_share_app:
print("True")
else:
print("False")
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/26.2 Safari/605.1.15
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner