Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

my all of my code is wrong in the tests checkbox ? what is wrong about my code ?

Your code so far

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

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

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

if distance_mi > 6 and has_car == True or has_ride_share_app == True:
    print('True')
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/144.0.0.0 Safari/537.36

Challenge Information:

Build a Travel Weather Planner - Build a Travel Weather Planner

whyy all of my code is wrong in the tests checkbox ? what is wrong about my code ?

Are you printing just one thing?

And I’m seeing this syntax error in the console for your code:

Traceback (most recent call last):
  File "main.py", line 13
    if distance_mi > 1 and <= 6 :
                           ^^
SyntaxError: invalid syntax
1 Like

Great start! A couple additional thoughts on some things to check. First, revisit instruction #5 and see if your code is evaluating the correct conditions.

Also, think about how if/elif/else logic works and whether using if/elif will evaluate all conditions together or in steps.

Lastly, take another look at your and/or logic. Consider how and/or work together and what happens if you introduce parentheses.