Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

Rule 15 is ticked as complete with the following code:
if distance_mi == 0:
print(False)
if distance_mi <= 1:
if is_raining == True:
print(False)

Rule 16 is ticked but Rule 17 isn’t so I changed to

if distance_mi == 0:
print(False)
if distance_mi <= 1 and is_raining == False:
print(True)
elif distance_mi <= 1 and is_raining == True:
print(False)

Now rule 16 and 17 are correct but it says rule 15 isn’t.

Please can someone point me in the right direction.

Your code so far

distance_mi = 10
is_raining = False
has_bike = True
has_car = True
has_ride_share_app = False

if distance_mi == 0:
    print(False)
if distance_mi <= 1 and is_raining == False:
    print(True)
elif distance_mi <= 1 and is_raining == True:
    print(False)



Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 Edg/147.0.0.0

Challenge Information:

Build a Travel Weather Planner - Build a Travel Weather Planner

Welcome to the forum @newtothis!

Please organize your code so it prints only one thing.

Also, how can you test distance_mi = 10 when you haven’t written code for that yet?

Happy coding!

Thanks for the wlcome!

Sorry, what do you mean organize it so it only prints one thing? As in there should be a line of whitespace between the code for each scenario?

The instructions were to create a variable “distance_mi”, are you saying I should be leaving this blank and then trying different numbers to test that the code works?

If distance_mi is 0, your code currently prints both False and True. It should only print one thing.

You should set distance_mi to a value that’s within the range of what you have written code for so you can see if your code returns what’s expected. And you should change the other variable values as well to test that your code prints what is expected.