Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

I keep getting an error in step 21 and 23. I don’t know what I’m doing wrong. Please help.

Your code so far

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

if distance_mi == 0:
    print('False')


elif distance_mi <= 1:

    if not is_raining:
        print('True')

    else:
        print('False')


elif distance_mi > 1 or distance_mi <= 6:

    if has_bike and not is_raining:
        print('True')

    else:
        print('False')


else:

    if has_car and not has_ride_share_app:
        print('True')
    
    elif has_ride_share_app and not has_car:
        print('True')

    else:
        print('False')

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0

Challenge Information:

Build a Travel Weather Planner - Build a Travel Weather Planner

Hi @Mysterious_m,

Try putting some extra prints inside your if/elif/else statements to see where your code is going when you change the value of variables to test your code

print("in if")
print("in <= 1")
print("in >1 <=6")
print("in else")

Then test with distance_mi = 7 and distance_mi = -1

Change other variables too to test each condition well.

Happy coding!