FAQ: Control Flow - Boolean Expressions

This community-built FAQ covers the “Boolean Expressions” exercise from the lesson “Control Flow”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Computer Science
Data Science

FAQs on the exercise Boolean Expressions

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

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

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

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

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

A post was merged into an existing topic: Why am I getting the wrong response for statement 4?

4 posts were split to a new topic: Why am I getting the wrong response for statement 4?

Can I set a False boolean expression to be True?
for example
define (1 > 9) to be True

You can place not before the expression , and it will reverse the Boolean. For example:

x = (1 > 9) # evaluates to false

x = not (1>9) # evaluates to true

Yes, I understand that and thank you for the response. But (1 > 9) would still be False in that equation.
What I mean is set (1 > 9) to be True, so “not (1 > 9)” would be False
Is it possible to do that in the codes?

How come “Friday is the best day of the week.” is not a boolean expression? It can be answered by Yes or No.
If friday is not my best day of the week i can reply with No.

Because it can be answered subjectively, i.e. my favorite day of the week may be Wednesday, so my answer the question may be no, and therefore it cannot be answered yes or no consistently from anyone.

Additionally, the mods from Codecademy should seriously work on the wording for this question, as I found it seriously challenging to understand that they were not asking us to provide the true or false values in a string to the variable but instead filling in the string with a yes or no dependent on whether or not the statement was a true boolean.

Best the mods can do is pass along suggestions and recommendations to the Curriculum Team. We didn’t/don’t write the course material.

1 Like

Sorry, I suppose I didn’t mean mods, simply the Codecademy Admin team.

1 Like

I am totally confused in this question please some one helpme on this

Just in case answer is:

example_statement = “No”

statement_one = “Yes”

statement_two = ‘Yes’

statement_three = ‘No’

statement_four = ‘Yes’

I found this to be a very confusing question. Luckily I have learned about boolean values before, but this would have been detrimental to my learning if I hadn’t. I wasn’t able to proceed because my subjective answers were “wrong” and I had to answer Yes to “Cats are female dogs”. Not intuitive for how to proceed in the course.

1 Like

Mee too bro, I was really confused while i am attending that question

I agree with those above. This does not teach booleans well. If a statement can be answered with true/false or yes/no, then it is a boolean, regardless of whether the statement contains fact or opinion.