Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

I have no clue what I’m doing wrong to be fr, so I can’t even specify my problem, but if someone can nudge me in there ight direction it’d be nice.

Your code so far

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

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

if distance_mi < 1 and is_raining == False:
    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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6.2 Safari/605.1.15

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

Hi @semradovaemma,

I’m seeing this syntax error in the console:

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

What user story is this code implementing?

Happy coding

Instead of the previous thing I changed that to: if distance_mi > 1 and distance_mi <= 6: but now it’s stuck at: elif has_bike == True and is_raining == False: Also, I thought we had to pick a random number for the distance_mi variable?

you can write any number when you create distance_mi, yes

but what is this if here about?

I don’t understand what it means to make distance_mi a falsy value

Take a look at this reference to better understand falsy values and how to test for them:

like this if I set my variable to distance_mi = 8?

or is that still wrong? sorry im confused

that is still using 8 as an arbitrary value, not checking if it is a falsy value

please see this lesson again https://www.freecodecamp.org/learn/python-v9/lecture-booleans-and-conditionals/what-are-truthy-and-falsy-values-and-how-do-boolean-operators-and-short-circuiting-work

is this better?

yes and no, you are checking for a truthy value

but remember that you also need to only print only one True/False in total for each situation