Heres my code so far… i seem to be struggling with #15. When the distance_mi is a falsy value the program should print False.
distance_mi = 0
is_raining = True
has_bike = False
has_car = False
has_ride_share_app = False
if distance_mi <= 1 and is_raining == False:
print(‘True’)
elif distance_mi <= 1 and is_raining == True:
print(‘False’)
if distance_mi <= 6 and is_raining == True and has_bike == False:
print(‘False’)
else:
print(‘True’)
dhess
2
Please re-post your formatted code as follows, so we can see the indentation.
When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add the backticks.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
dhess
3
Welcome to the forum @justindecksandall !
Is zero a falsy value or a truthy value?
system
Closed
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.