Build a Travel Weather Planner #21

Tell us what’s happening:

I’m having an issue passing #21

I’ve also tried entering the code like this:
elif distance_mi >6 and has_ride_share_app==True or has_car==True:
print(True)
else:
print(False)

and this:
elif distance_mi >6 and has_ride_share_app==True:
print(True)
elif distance_mi >6 and has_ride_share_app==False:
print(False)

Your code so far

distance_mi=10
is_raining=False
has_bike=False
has_car=True
has_ride_share_app=True

if bool(distance_mi)!=True:
    print(False)
elif distance_mi <=1 and is_raining==False:
    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==False:
    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_bike==True and is_raining==False:
    print(True)
elif distance_mi >1 and distance_mi <=6 and has_bike==False and is_raining==True:
    print(False)
elif distance_mi >1 and distance_mi <=6 and has_bike==False and is_raining==False:
    print(False)
elif distance_mi >=6 and has_bike==False:
    print(False)
elif distance_mi >6 and (has_ride_share_app==True or has_car==True):
    print(True)
else:
    print(False)

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36

Challenge Information:

Build a Travel Weather Planner - Build a Travel Weather Planner

GitHub Link: https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/lab-travel-weather-planner/694acade1d4afdbce71e5840.md

Welcome to the forum @megane0724,

Where in the instructions are you asked to implement this condition?

Happy coding

21. When the distance is greater than 6 miles and a ride share app is available, the program should print True.
I think you want to check this in the last elsif. But your output is False because the first elsif is also met when has_bike is False. I suggest swapping the two condition positions.

Careful please. Look closely at the instructions. Where does it mention implementing distance_mi >=6 and has_bike==False?

Hi all, ty, I was able to solve after re-reviewing. I think I just had brain fog lol