Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

I am stucked on this exercise :frowning:
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

Welcome to the forum @jlito84

image

There is a message in the console.

Happy coding

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

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

Thank you, Teller! :slight_smile: I have not been able to complete the following tasks.

What happens when distance_mi and is_raining are both set to False?

Happy coding

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?

I could solve it :slight_smile: Thank you!

I have solution
code removed by moderator

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.