Mix 'n' Match - no input in script.py to work with


#1

Hi,

I can’t seem to do the exercise in Mix ‘n’ Match because there is no input in script. py which I can work with (it appears as on the image). I only have variables, but there is no content assigned to them in which I can do anything with the boolean operators. Resetting the exercise does not help.

46

Other exercises seem to have been buggy, too, appearing with the correct answers right off the bat. A reset has sometimes helped there, but isn’t helping now.

Am I doing something wrong or is there a bug?


#2

Follow the instructions and evaluate the expressions in your head, then post the outcome.

Not exactly, but close enough given we do not have link to the exercise. Please post it in your reply so we can see for ourselves what is happening.


#3

So line 6 says “Make me true!”, but then in line 7 there is only "bool_two = ", so what is the “me” that I am supposed to make true? The content in line 4?

Here’s the link:

https://www.codecademy.com/courses/learn-python/lessons/conditionals--control-flow/exercises/mix-n-match?action=resume_content_item


#4

Correct. Write an expression that uses all the operators and yields a result of true. The SCT will run your code and check the result.

The first one is done for us, and your examples may be anything at all, so long as they yield what is expected, True or False.

Use a sandbox like REPL.IT or the interactive shell in python if you have it on your machine to play with this exercise. Do lots of trials and figure out why you don’t the outcome you predict.

Recall that order of precedence applies boolean operators. NOT has the highest, followed by AND, followed by OR. Brackets always come before anything.

not (False and True)

In the above, we would evaluate the AND expression first, then negate it with the NOT.


#5

Okay, thanks. I managed to do the exercise now. :slight_smile:


#6

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