Tell us what’s happening:
Hello community!
My code doesn’t run and I don’t know where the mistakes are.
Thank you in advance for your help.
Your code so far
distance_mi = 5
is_raining = False
has_bike = False
has_car = True
has_ride_share_app = False
if distance_mi <= 1:
if is_raining == False:
print('True')
else:
print('False')
if distance_mi > 1 and distance_mi <= 6:
print('True')
elif has_bike == True and is_raining == False:
print('True')
else:
print('False')
if distance_mi > 6:
if 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.2 Safari/605.1.15
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner
ILM
February 12, 2026, 5:46pm
2
what do you mean that it doesn’t run? don’t you see the output in the terminal?
Let’s see the first failing test
When the distance is 1 mile or less and it is not raining, the program should print True .
So let’s set that
at the top with distance_mi = 0.5 and is_raining = False, and let’s see what get printed:
True
False
False
well, that’s a bit more than True, don’t you think that could be an issue?
Sorry it does run and I can see the output in the terminal. The issue is that it gives me some mistakes and I don’t know how to fix them because I don’t see them. For me the code is making what it asks for
ILM
February 12, 2026, 6:08pm
4
did you see the rest of my post? are you sure that True and True False False are the same thing?
Ohhh I see!
Now my code looks like this and I still can’t solve the issue.
distance_mi = 5
is_raining = False
has_bike = False
has_car = True
has_ride_share_app = False
if distance_mi <= 1:
print('True')
if distance_mi > 1 and distance_mi <= 6:
print('True')
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 == False:
print('True')
else:
print('False')
ILM
February 13, 2026, 12:54pm
6
are you srue that’s your code? the indentation is not valid
distance_mi = 5
is_raining = False
has_bike = False
has_car = True
has_ride_share_app = False
if distance_mi <= 1:
print('True')
if distance_mi > 1 and distance_mi <= 6:
print('True')
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 == False:
print('True')
else:
print('False')
ILM
February 13, 2026, 12:57pm
8
let’s follow the logic, so the first condition checked is
hector.hardy:
if distance_mi <= 1:
which is False, it’s not entered, so now it goes here:
these are never going to be reached
Congratulations on solving the challenge! You should be proud of your achievement…we are! But we are removing your working solution, so it is not available to others who have not yet done the work to get there. Again, congrats!
1 Like