Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

Please I am unable to move further or identify my mistake. I am not sure about what I have to do next after interpreting the instructions.
Thank you very much

Your code so far

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

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




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

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




Your browser information:

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

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

Welcome to the forum @LaurenO,

If I change distance_mi to 0.5, your code prints two things: False and True. It should only print one thing.

Happy coding

Thank you very much for your kind response, I believe I have sorted it out now although I am not entirely sure. I currently have a challenge , the instruction part has about 5 of the instruction marked wrongly. Please how can I make it right. Thank you.

Please post your updated code, formatted 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:

Is this the correct syntax to call a print function? Look closely.

What prints if distance_mi is 7 and has_car and has_ride_share_app are both False?

Happy coding

Thank you so much for your help, I have been able to rectify my mistake. I have all correct on the instruction now :smiling_face: