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
dhess
September 15, 2026, 3:26pm
2
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?
ILM
September 15, 2026, 3:32pm
4
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
dhess
September 15, 2026, 3:42pm
6
Take a look at this reference to better understand falsy values and how to test for them:
Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and...
like this if I set my variable to distance_mi = 8?
or is that still wrong? sorry im confused
ILM
September 15, 2026, 3:53pm
8
ILM
September 15, 2026, 7:02pm
10
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