Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

Each section of the code satisfies the the corresponding problem, apart from the use of elif, but altogther, it fails.

Your code so far

distance_mi = 2
is_raining = True
has_bike = True
has_car = True
has_ride_share_app = True

if not isinstance (distance_mi, int):
    print (True)

if distance_mi <= 1 and is_raining == False:
    print("True")
else:
    print("False")

if distance_mi > 1 and distance_mi <= 6 and has_bike and is_raining == False:
    print("True")
else: 
    print("False")

if distance_mi > 6 and (has_car or has_ride_share_app): 
    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/144.0.0.0 Safari/537.36

Challenge Information:

Build a Travel Weather Planner - Build a Travel Weather Planner

Welcome to the forum @prosperebube22

Try using an elif statement for tests 15 and 16.

Happy coding

are you sure you are expected to print that many things?

with that distance_mi the user story to look at is:

the person has a bike but it’s raining, so you should print False.

Instead I see

False
False
False

are you sure that it’s the same thing?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.