Same error a lot of people are getting in Building a Weather Planner lab - probably the most common error:
“When distance_mi is a falsy value, the program should print False.”
Q- Isn’t distance_mi == 0 a falsy value? Why am i still receiving an error?
Your code so far
distance_mi = 5
is_raining = True
has_bike = True
has_car = True
has_ride_share_app = True
if distance_mi==0:
print('False')
if distance_mi <= 1 and is_raining != True:
print ('True')
elif (distance_mi >= 1 and distance_mi<= 6) and has_bike:
print ('True')
else:
print ('False')
if distance_mi >6 and (has_car or has_ride_share_app):
print ('True')
else:
print ('False')
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0
Challenge Information:
Build a Travel Weather Planner - Build a Travel Weather Planner
I don’t know and can’t tell. This falsy issue reminds me of taking first semester calculus in college. The TA’s were trying to teach epsilon and delta proofs half way thru the first semester. Nobody understood it, and it was unnecessary at that juncture, We were there to start learning computational tools and we were getting high level theory. This falsy issue is like that. It is not here that that subject should be presented. I hope this one lab does not impede my progress to the final goal of Python certification.