FAQ: Learn Python - Conditionals & Control Flow - And


This community-built FAQ covers the “And” exercise in Codecademy’s lessons on Python.

FAQs for the Codecademy Python exercise And:

Join the Discussion. We Want to Hear From You!

Have a new question or can answer someone else’s? Reply (reply) to an existing thread!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources about Python in general? Go here!

Want to take the conversation in a totally different direction? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account, billing, Pro, or Pro Intensive? Reach out to our support team!

None of the above? Find out where to ask other questions here!


Other FAQs

The following are links to additional questions that our community has asked about this exercise:

  • This list will contain other frequently asked questions that aren’t quite as popular as the ones above.
  • Currently there have not been enough questions asked and answered about this exercise to populate this FAQ section.
  • This FAQ is built and maintained by you, the Codecademy community – help yourself and other learners like you by contributing!

Not seeing your question? It may still have been asked before – try (search) in the top-right of this page. Still can’t find it? Ask it below by hitting the reply button below this post (reply).


I have no idea what to type into the editor for this “And” practice. The Hint doesn’t help out in any way either. I understand math equations and can work out if an equation is true or false, but what am I supposed to type in the editor after each variable? Is this just an exercise in cut, copy, and paste?

Am I supposed to define the ‘bool_one’ variable as:
bool_one = False and False

or am I supposed to make up an equation? I’m clearly not understanding this whole line of exercises.


No, we are supposed to visually/mentally evaluate that expression and supply what we believe the outcome to be.

False and False

will be False since we know that AND short-circuits on false. Only the first operand is evaluated in this case. We are given mental exercises like this so we gain instant recognition of things like that, and are able to do it in our head.


I agree with Brave - I had no idea what to do here. And I’m not sure that mtf’s answer is correct… I had to go to “solution” which is just to type exactly what’s in the instructions. I’m not sure how that helps me learn it. But I’m new so who knows. :slight_smile:


I agree with gthill, it’s unclear what is required, I tried what mtf suggested and it didn’t work, so in the end I used the solution button and it was a copy paste situation. Baffling.


For the record, I did not give a solution. We are given expressions to visually examine and evaluate in our heads. Look at it, break it down, first the left operand, then the right (if needs be).

Keep in mind that if the first operand is False then we need not continue evaluating. We’re done. The expression is False. If the first operand is True, then evaluate the second. If it is False then the expression is False, else True.

Do this in your head. That’s the bottom line.