Build a Travel Weather Planner

When distance_mi is a falsy value, the program should print False.

Have been having issue with this any clarification

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

distance_mi = 0

is_raining = True

has_bike = True

has_car = True

has_ride_share_app = True



if not isinstance(distance_mi, int):

    print("False")

elif distance_mi <= 1 and not is_raining: 

    print("True")

else:

     print("False")

if distance_mi > 1 and distance_mi <= 6 and has_bike and  not is_raining:

    print("True")

else:

    print("False")

if distance_mi > 6 and (has_car or has_ride_share_app):

    print("True")

else:

     print("False")

I still don’t get it

please share the link to the project, we are unable to help without context


I’ve edited your post to improve the readability of the code. 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 (').

Thanks a lot..

So please can i get answers from it

please provide the link to the challenge so people can help you

So basically have been on this screen since i don’t get the issue, after i checked my code it’s saying: When the distance is between 1 mile (excluded) and 6 miles (included), a bike is available, and it is not raining, the program should print True.

And i don’t get it

distance_mi = 0
is_raining = True
has_bike = True
has_car = True
has_ride_share_app = True

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

    

False is not the only falsy value, you may want to review that

note that with the or it behaves like (distance_mi > 1) or (distance_mi <=1 ad is_raining), so you are printing False everytime the distance is more than 1

I went ahead and combined your posts for you. In the future, just reply to the original thread to add further updates.