Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

I need help please, 20 and 22 keep not working.
I’ve been trying a bunch, hence my code has become very chaotic.
I believe something might out-rank the elif function and writes over it (kinda like <h1> would be of higher rank than <article> in html&css).
I really want to know what exactly is wrong with my code and couldn’t find any problem like it on the forum.
(I’ve been stuck on this for quite the while so maybe I just got stupid-brain by now…)

Your code so far

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

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

elif distance_mi > 6:
    if has_ride_share_app == True:
        print('True')
    elif has_ride_share_app == False:
        print('False')
    elif has_car == False:
        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/142.0.0.0 Safari/537.36 OPR/126.0.0.0

Challenge Information:

Build a Travel Weather Planner - Build a Travel Weather Planner

Hi.

Welcome to the forum. Please don’t create duplicate posts. I have deleted your other post.

you have this one

why do you think this one is ever going to run? the condition above is going to be True first

use this tool to visualize your code: Python Tutor code visualizer: Visualize code in Python, JavaScript, C, C++, and Java
so you see which lines are executed and what they do

that is not something that happens in Python

Thank you, the site really helped :slight_smile:
But pls remember that most people ask bc they just don’t know any better and are new to this

I hope you have a wonderful day and again a very big thanks :smiley: