Build a Travel Weather Planner - Build a Travel Weather Planner

Tell us what’s happening:

Не понимаю, почему пункт 15, 18 и 19. Не выполняются.
15. Если distance_miзначение неверно, программа должна вывести False.
18. Если расстояние находится в диапазоне от 1мили (исключая) до 6мили (включая), и идет дождь, а велосипеда нет, программа должна вывести сообщение False.
19. Если расстояние находится между 1милями (исключая) и 6милями (включая), дождь не идёт, но велосипеда нет, программа должна вывести сообщение False.

Your code so far

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

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.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 Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

застрял на этом этапе, пункт 15 ,18 и 19 не выполняются. Остальные выполнены.

Если distance_miзначение неверно, программа должна вывести False.

То что пишут после проверки кода

what code do you have for this?

if distance_mi == False:

print('False')

what is your whole code including that?

мой код:

distance_mi = 5

is_raining = False

has_bike = False

has_car = True

has_ride_share_app = True

if distance_mi == False:

print('False')

if distance_mi <= 1 and is_raining == False:

print ("True")

elif distance_mi <= 6 and distance_mi > 1 and is_raining == False and has_bike == True :

print('True')

elif distance_mi >= 6 and (has_car == True or has_ride_share_app == True):

print('True')

else:

print("False")

you have two if, that means that you will not print only one thing, while you need to print only one thing

окей, если я убираю первое if, ничего не меняется.

do not remove it, find a way to print always only one thing