Build a Travel Weather Planner: Tests 21-23 error?

Tell us what’s happening:

Your code so far

distance_mi = 7
int(distance_mi)
is_raining= False
has_bike = True
has_car = False
has_ride_share_app = False


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

I’m meeting all the criteria save for the last three. Thing is, it says I managed to meet “Distances greater than 6 miles: Car Available?” As you can see, there’s nothing there, so I’m somehow glitching the testing or something.

Build a Travel Weather Planner: Build a Travel Weather Planner | freeCodeCamp.org Lesson URL (copy - paste from your browser’s address bar)

Welcome to the forum @PhilMegrim,

Does your code ever get here? Check it by adding print("in > 6") as the first line inside elif distance_mi > 6:.

Do you see that in the console?

Now add print("in > 1 <= 6") as the first line inside elif (distance_mi > 1 or distance_mi <= 6):.

Happy coding

Once you decipher whether it reaches the block for distance_mi > 6,
think of addressing the requirements in User story 7 in the most simple way. It demands the truthy outcome first - just a hint to avoid the many conditional branching possibilities.