Sap
February 12, 2026, 12:07am
1
Tell us what’s happening:
can someone explain further to me why this is wrong
Your code so far
distance_mi = 10
is_raining = True
has_bike = False
has_car = False
has_ride_share_app = True
if distance_mi <= 1 and is_raining == True:
print('False')
else:
print('True')
if distance_mi > 1 and distance_mi <= 6 or(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.2 Safari/605.1.15
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner
1 Like
What do you mean “it’s wrong” ? Please Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!
ILM
February 12, 2026, 8:02am
3
how many things are you expected to print?
dhess
February 12, 2026, 1:35pm
4
You should use if, elif, and else statements to evaluate the distance categories in ascending order.
Does your code satisfy this requirement?
1 Like
Sap
February 13, 2026, 2:32pm
5
thanks that is true, very true
Sap
February 13, 2026, 2:44pm
6
id like to print 3 “arguments”, I have 3.
is where I’m stuck on at the moment.
Sap
February 13, 2026, 2:47pm
7
distance is “less than or equal to 1” and it is raining, why do I not pass those checks?
dhess
February 13, 2026, 2:52pm
8
Try to organize you if/elif/else statements so you only print one value.
1 Like
ILM
February 13, 2026, 2:57pm
9
but are you sure that’s what you are asked to print? are you sure that you are not asked to print only one value?
if your distance is less than 1 mile, you should not print anything for more than 6 miles
Sap
February 13, 2026, 5:27pm
10
put everything into one “if” statement? and everything in the body?
dhess
February 13, 2026, 5:30pm
11
Try that using elif as well as if/else.
Sap
February 13, 2026, 5:32pm
12
will get on it. how would I post the new code when I’m finished?
ILM
February 13, 2026, 5:34pm
13
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 (').
dhess
February 13, 2026, 5:34pm
14
Thank you for asking!
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 (').
system
Closed
March 13, 2026, 5:34pm
15
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.