jlito84
February 26, 2026, 7:18pm
1
Tell us what’s happening:
I am stucked on this exercise
distance_mi = 20
is_raining = True
has_bike = False
has_car = False
has_ride_share_app = True
if not isinstance(distance_mi, int):
print(True)
elif distance_mi <= 1:
if is_raining == False:
print(True)
else:
print(False)
elif distance_mi >= 1 and distance_mi <= 6:
if has_bike == True and is_raining == False:
print(True)
else:
print(False)
elif distance_mi >= 6:
if has_car == True:
print(True
Your code so far
distance_mi = False
is_raining
has_bike
has_car
has_ride_share_app
if distance_mi <= 1:
if is_raining == False:
print(True)
else:
print(False)
elif distance_mi >= 1 and distance_mi <= 6:
if has_bike == True and is_raining == False:
print(True)
else:
print(False)
elif distance_mi >= 6:
if has_car == True:
print(True)
elif 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/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner
Teller
February 26, 2026, 7:22pm
2
Welcome to the forum @jlito84
There is a message in the console.
Happy coding
jlito84
February 26, 2026, 7:25pm
3
Tell us what’s happening:
I am not able to complete the tasks. I am stucked.
Your code so far
distance_mi = 20
is_raining = True
has_bike = False
has_car = False
has_ride_share_app = True
if not isinstance(distance_mi, int):
print(True)
elif distance_mi <= 1:
if is_raining == False:
print(True)
else:
print(False)
elif distance_mi >= 1 and distance_mi <= 6:
if has_bike == True and is_raining == False:
print(True)
else:
print(False)
elif distance_mi >= 6:
if has_car == True:
print(True)
elif 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/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner
Teller
February 26, 2026, 7:26pm
4
I went ahead and combined your posts for you. In the future, just reply to the original thread to add further updates.
Happy coding
1 Like
jlito84
February 26, 2026, 7:28pm
5
Thank you, Teller! I have not been able to complete the following tasks.
Teller
February 26, 2026, 7:31pm
6
What happens when distance_mi and is_raining are both set to False?
Happy coding
jlito84
February 26, 2026, 7:37pm
7
I am stucked on this task: 15. When distance_mi is a falsy value, the program should print False.
What does your program print when distance_mi is a falsy value?
jlito84
February 27, 2026, 2:05pm
11
I could solve it Thank you!
I have solution
code removed by moderator
ILM
March 3, 2026, 8:13am
13
hi @ramoscarloandre57
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.