Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

My code from 15 is marked X, I have tried everything i can think of it’s not working, please i need pointers

Your code so far

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

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

if distance_mi <= 1 and is_raining == False:
 print('True')
elif distance_mi <= 1 and is_raining == True:
 print('false')
else:
    print('False')

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

if distance_mi > 6: 
 has_car == True or has_ride_share_app == True
print('True')

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36

Challenge Information:

Build a Travel Weather Planner - Build a Travel Weather Planner

Please organize your code so it prints just one thing.

some numbers are still marked X please i need pointers
distance_mi = 9
is_raining = True
has_bike = False
has_car = True
has_ride_share_app = True

if distance_mi == False:
print(‘False’)

if distance_mi <= 1:
    print('True')

    if distance_mi > 1 and  distance_mi <= 6: 

        if distance_mi > 6: 
            print('True')
        elif has_car == True:
            print('True')
        elif has_ride_share_app == True:
            print('True')
    elif has_bike == True: 
        print('True')
    elif is_raining == False:
        print('True')
elif is_raining == True:
    print('False')

else:
print(‘False’)

If distance_mi is 0, you are printing two things.

Careful with indentation.

You have if distance_mi > 1 and distance_mi <= 6: inside if distance_mi <= 1:

I suggest testing your code with different values based on your conditions and the user stories to see if it prints what is expected.


If you need more help, please post your updated code, as follows:

When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add the backticks.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').