Bug in Conditionals & Control Flow / Compare Closely!


#1

This line has problem.it must be False but it's True.
Please fix it.


#2

you understood the exercise wrong, you have to evaluate if (for example for bool_four) this condition:

-22 >= -18

would evaluate to true, if so, set bool_four to true:

bool_four = True

if it where to evaluate to false, set bool_four to false:

bool_four = False

this goes for all.


#3

Set this to True if -22 >= -18 or to False if it is not

So, -22 is less than -18. Should be:

bool_four = (-22 >= -18) == False;

#4

i disagree with your answer, from the instructions:

Set each variable to True or False depending on what you think the result will be

each variable would refer to bool_one, bool_two ... bool_five. So, in case of bool_four you would need to set bool_four to false:

bool_four = False

this is what the exercise asks of you


#5

bool_four = (-22 >= -18) == False returns True, but you are right. I also misunderstood the exercise.(( Thank you for your explanation.


#6

except if you look in the instructions the condition you have evaluate for bool_four is:

Set bool_four equal to the result of -22 >= -18

which is False. Given this new insight, i also think i better understand what @keeper.allstars is doing wrong, he copied the condition, and then compared it to the actually outcome, rather then set bool_x to a boolean value.


#7

Exactly look at this


#8

Okay, well here is the problem. now this:

bool_four = (-22 >= -18) == True

would evaluate to False, which is what bool_four should be set to. The problem is, the exercise just checks if the end result is True or False.


#9

Your bool_five is incorrect too. This one's a little weird to understand, but I guess all it's asking is whether or not the condition is True or False. Is (-22 >= -18)? If it is, then it'd be true, but if not, it's false.


#10

but part of this problem is also in the validation, this:

(-22 >= -18)

would evaluate to False. But by checking if it is equal to True:

(-22 >= -18) == True

the condition is evaluate to False. And the exercise accepts it, while it is not according to the instructions


#11

Weird, I didn't realize the exercise was accepting it... That's interesting. Thanks for the clarification.


#12

interesting and troubling, given it will confuse some/many students.


#13

Yeah. The update will come soon though, and then there will be a bunch of new problems to worry about. :slight_smile:


#14

yea, like the inability to run code again in exercises you already completed.


#15

There is still a bug on this, even if you set it == True or == False it now gives an error and says to check the value


#16

The instructions for some of the exercises in Conditionals & Control Flow tend to confuse many of the users. For exercises 2, 3, 6, 7, 8, and 9, where the text reads something like, "Set ... equal to the result of ...", all that needs to be done is to create assignment statements that resemble either this ...

bool_one = False

... or this ...

bool_one = True

..., as appropriate, to set the value of each variable to match either the True or False value of the expressions that are given.

In Exercise 4: How the Tables Have Turned, however, the task is to write more complex expressions that evaluate to either True or False.


#17

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