▲ 4 r/FreeCodeCamp
Struggling with the Build a Travel Weather Planner Lab
I checked each code if they made sense and to me they did but I genuinely don't see the problem. I also tested each of them.
This is my code:
distance_mi = 4.3
is_raining = True
has_bike = True
has_car = False
has_ride_share_app = True
if distance_mi == False:
print('False')
if distance_mi <= 1:
if is_raining:
print('False')
else:
print('True')
else:
print('False')
if (distance_mi > 1 and distance_mi <= 6) and has_bike and is_raining:
print('True')
elif (distance_mi > 1 and distance_mi <= 6) and has_bike and is_raining == True:
print('True')
else:
print('False')
if distance_mi > 6:
if has_ride_share_app:
print('True')
elif has_car:
print('True')
else:
print('False')
I'm getting all tests from 15 to 23 wrong but there was a time when I got 18 to 20 right but when I deleted some extra lines and tested it, it marked them wrong. Like I don't get it atp.
u/Junior_Path_4439 — 4 days ago