# Conditionals & Control Flow is NOT WORKING!

#1

Conditionals & Control Flow

It's saying that my bool_4 is incorrect but I've changed it a million times and I even opened the labs to double check my math. The lab has confirmed every one of my lines including 4.

Oops, try again. Double check your value for bool_four!

I expect the coded to be approved so I can move on.

``````bool_one = 2 > 4 and 4 > 7 is False

bool_two = -(-(-(-2))) == -2 and 4 >= 16**0.5 is False

bool_three = 19 % 4 != 300 / 10 / 10 and 7<3 is False

bool_four = -1**2 < 2**0 and 10 % 10 <= 20 - 10 * 2 is True

bool_five = 1 < 2 and 2 < 3 is True``````

#2

Do you know what everything there does?
What about the `is`-operator? If you can't account for it all, then you can't leave it that way.
`is` has not been introduced, you're not meant to use it.
You'll need to reconsider what the instructions are asking you to do.

#3

Is has actually been introduced. Here are the instructions:

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.

Instructions
Let's practice with and. Assign each variable to the appropriate boolean value.

Set bool_one equal to the result of False and False
Set bool_two equal to the result of -(-(-(-2))) == -2 and 4 >= 16**0.5
Set bool_three equal to the result of 19 % 4 != 300 / 10 / 10 and False
Set bool_four equal to the result of -(1**2) < 2**0 and 10 % 10 <= 20 - 10 * 2
Set bool_five equal to the result of True and True

#4

That's English. They are saying what those expressions evaluate to. They are not saying what the `is`-operator does, or saying that you should use it!

Look at what it actually asks you to do!

What is the result of a boolean expression?

and,

#5

I finally figured it out after having a professional help me. The didn't want the expressions, they wanted whether they were true or false. Here are the correct answers:

bool_one = False and False is False

bool_two =False and True is False

bool_three = False and False is False

bool_four = True and True is True

bool_five = True and True is True

#6

That may pass, but is not what's asked for.

#7

I literally assigned each variable a boolean value. A boolean value is denoted by True or False. Please, for the love of English, tell me how that is not what they asked for? Also, why would it pass is it isn't what they asked for?

#8

You wrote your own expressions which evaluate to boolean values. Your expressions evaluate to the correct values, but aren't what you're meant to do at all, it's just that there are only two booleans so you've got a 50/50 chance to get it right and then just fix it with trial and error.

The result of a boolean expression is a boolean. So you have `True`, or `False`
`bool_eight = True`
So you're meant to evaluate the expressions manually and enter the results

A whole lot of things get passed when you do something that the author didn't anticipate!

#9

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