Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

please help me with this code I need serious guidance

Your code so far

distance_mi = 7
is_raining = True
has_bike = False
has_car = True
has_ride_share_app = False
 
if distance_mi == 0 :
    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 == True and not is_raining:
    print('True')
else:
        print('False')

if distance_mi > 6:
    if (has_car or has_ride_share_app):
      print('True')
else:
    print('False')


    

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36

Challenge Information:

Build a Travel Weather Planner - Build a Travel Weather Planner

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-travel-weather-planner/694acade1d4afdbce71e5840.md at main · freeCodeCamp/freeCodeCamp · GitHub

please make sure to print only one thing at a time, there should not be multiple True or False in the terminal, only one True or False in total

please explain it more

What about that did you not understand?

Should everything sum up to one answer?

While I don’t think “sum” is an appropriate word for this challenge, yes, there should be only one thing printed in the console — either True or False.

it got fixed. thanks for the help and explanation but another issue has risen. Please the last test keeps on failing

Please post your updated code as follows:

There are two ways you can format your code to make it easier to read and test:

  1. After you copy/paste your code into the editor, select it by dragging your cursor over it then click the (</>) button in the toolbar to automatically wrap your code in backticks. (You can click on the animated demo image below to enlarge it.)

  1. Manually add three backticks on a new line above your code and on a new line after your code. Note that a backtick is NOT the same as a single quote('). To find the backtick key on your keyboard, see this post.

To see changes to your post as you make them, you can click the (M+) button on the toolbar to bring up the rich text editor:

distance_mi = 7
is_raining = True
has_bike = False
has_car = False
has_ride_share_app = False
 
if distance_mi == 0:
    print('False')

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

elif distance_mi > 1 and distance_mi <= 6 and has_bike == True and not is_raining:
    print('True')

elif distance_mi > 6: 
    if  has_car or has_ride_share_app:
        print('True')  
elif distance_mi > 6 and (not has_car or not has_ride_share_app):
      print('False')
else:
    print('False')


I know that the problem is with the final lines of code but I cant find a way to fix it

please disregard I have been able to fix it by changing the last part to another code