You appear to have created this post without editing the template. Please edit your post to 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!
Afterwards, look at your code again and re-implement your if statements in the way which seems successful.
Another hint (Don’t read until you have an inkling): Indentations should always be four spaces, according to the PEP 8.
Happy coding on!
There are two ways you can format your code to make it easier to read and test:
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.)
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:
Idk if it’s because you transferred your code but have multiple indentations errors after all the if/elif/else statements (I send you back to hiitmeiguess’s post).
Here, you have an else, but there is not any statement associated with it. Therefore, Python considers that your else is associated with the previous elif, which will cause an error.
but the else still needs an elif or else before it. You need to have the else match the indentation of the elif above it, or your code will never work for an indentation error
Traceback (most recent call last):
File "main.py", line 10
else:
^
IndentationError: unindent does not match any outer indentation level
the code is, because both has_car and has_ride_share_app are booleans, so has_car or has_ride_share_app is also a boolean, and print(has_car or has_ride_share_app) is printing a boolean