Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

Hello, everyone. Could anyone please help me to solve this? There are only 4 required topics left for me to complete this lab activity, but I really don’t understand what I’m doind wrong. Need help with 16, 20. 21 and 22. Thank y’all

Your code so far

distance_mi = 1
isinstance(distance_mi, int)
is_raining = False
has_bike = True
has_car = True
has_ride_share_app = True

if distance_mi != True:
    print(bool(False))
elif distance_mi <= 1:
    if is_raining == True:
        print(bool(False))
    else:
        print(bool(True))
elif 6 >= distance_mi > 1:
    if is_raining == False and has_bike == False:
        print(bool(False))
    elif is_raining == False and has_bike == True:
        print(bool(True))
elif distance_mi > 6:
    if has_ride_share_app == True or has_car:
        print(bool(True))
    else:
        print(bool(False))

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.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

when do you expect this distance_mi != True to be false so that the other things are checked?

whenever distance_mi has a falsy value, is it right?

I’ve changed it for distance_mi == False and it worked! But there’s still a problem to solve with topics 19/20, everytime I change one the other returns an error

Here’s a reference that might help you understand more about falsy values and how to check for them:

no, because 3 != True is true but 3 is a truthy value

I solved it! Thanks for your help!