I have been trying to solve this for the past 2 hrs, not using ai, “I’m here to learn without it”
distance_mi = 5
is_raining = True
has_bike = True
has_car = True
has_ride_share_app = True
if not distance_mi:
print(False)
elif not is_raining :
if distance_mi >= 1 :
print(True)
elif distance_mi <=1 :
print(True)
else :
print(False)
elif distance_mi >1 and distance_mi <= 6 and not is_raining :
if not has_bike :
print(False)
elif has_bike :
print(True)
elif distance_mi > 6 and has_car and has_ride_share_app:
print(True)
if has_car:
print(True)
else:
print(False)
else :
print(False)
tried all sorts of expanding code and shrinking but the 19th and 23rd condition always remain failed
I’ll put them here for your convenience ![]()
- When the distance is between
1mile (excluded) and6miles (included), it is not raining but no bike is available, the program should printFalse.
23.When the distance is greater than 6 miles and no car nor a ride share app is available, the program should print False.