Conditionals & Control Flow


#1



https://www.codecademy.com/courses/python-beginner-BxUFN/2/5?curriculum_id=4f89dab3d788890003000096#
this line code solve it.....Set bool_four equal to the result of not not True or False and not True


Replace this line with your code. 
**how to imply it?which following below**
**Set bool_four equal to the result of not not True or False and not True**


#2

So lets take a look at step 04.) Set bool_four equal to the result of not not True or False and not True. So first, lets take at each key conjunction word and then take each part step by step. First: And,

Link to Lesson 6.) And https://www.codecademy.com/en/courses/python-beginner-BxUFN/2/2?curriculum_id=4f89dab3d788890003000096

The boolean operator and returns True when the expressions on both sides of and are true. For instance:

1 < 2 and 2 < 3 is True;
1 < 2 and 2 > 3 is False.

Second: Or, Link to Lesson 7.) Or https://www.codecademy.com/en/courses/python-beginner-BxUFN/2/3?curriculum_id=4f89dab3d788890003000096

The boolean operator or returns True when at least one expression on either side of or is true. For example:

1 < 2 or 2 > 3 is True;
1 > 2 or 2 > 3 is False.

Finally: Not, Lesson Link to 8.) Not https://www.codecademy.com/en/courses/python-beginner-BxUFN/2/4?curriculum_id=4f89dab3d788890003000096

The boolean operator not returns True for false statements and False for true statements.

For example:

not False will evaluate to True, while not 41 > 40 will return False.

Now that we have reviewed all three boolean operators, lets break the step down. So first off, bool_four can only equal True or False. There is no other option for it to equal. So one could just guess and pass the lesson with ease. However, we don't learn from that so lets learn why it is what it is.

not not True

As we noticed, not basically returns the opposite of the value it is attached to. You want to look at this not not True like this: not (not True) First, we have to figure out what not True is because the second not is attached to not True. Not True is obviously False. So now we have not (False) so not False is equal to True! So now our equation per say looks like this: True or False and not True.

Next lets look at:

False and not True

Now as we know not True equals False so we really have False and False. As we know from our review that and returns True when the expressions on both sides of and are true. However, with False and False it is false. So now we have as our official equation per say True or False.

True or False

Now we simply need to evaluate this simple or statement to determine our final answer. As we know from our review or returns True when at least one expression on either side of or is true. And since one of our sides of or is True our final answer for bool_four is True. :thumbsup:

bool_four = True

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.