Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

i have been trying to pass this for hours but if i change my final else too ‘true’ all my false will be wrong and if i change my final else to ‘false’ all my true will be wrong

Your code so far

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


        

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) 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: freeCodeCamp/curriculum/challenges/english/blocks/lab-travel-weather-planner/694acade1d4afdbce71e5840.md at main · freeCodeCamp/freeCodeCamp · GitHub

Welcome to the forum @melvinCTO

Why is your first if statement using a walrus operator?

Happy coding

Hi @melvinCTO,

Please organize your code so it prints only one thing.

If distance_mi is falsy, should you print True? If distance_mi is falsy, should you continue to process more if statements? Are you using not correctly in your conditions? What condition is your final else attached to?

Please review the user stories again to make sure you are implementing them correctly.

Happy coding!