FAQ: Learn Python - Conditionals & Control Flow - Compare Closely!

This community-built FAQ covers the “Compare Closely!” exercise in Codecademy’s lessons on Python.

FAQs for the Codecademy Python exercise Compare Closely!:

Join the Discussion. We Want to Hear From You!

Have a new question or can answer someone else’s? Reply (reply) to an existing thread!

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

Need broader help or resources about Python in general? Go here!

Want to take the conversation in a totally different direction? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

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

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

Other FAQs

The following are links to additional questions that our community has asked about this exercise:

  • This list will contain other frequently asked questions that aren’t quite as popular as the ones above.
  • Currently there have not been enough questions asked and answered about this exercise to populate this FAQ section.
  • This FAQ is built and maintained by you, the Codecademy community – help yourself and other learners like you by contributing!

Not seeing your question? It may still have been asked before – try searching for it by clicking the spyglass icon (search) in the top-right of this page. Still can’t find it? Ask it below by hitting the reply button below this post (reply).

I set every comparator correctly why the console is not showing anything?

1 Like

Because there are no print statements. The SCT checks your submission and if everything is okay, you are good to move to the next lesson. Printing in these exercises has no real meaning.

2 Likes

I set these signs <<< next to 17 < 328 True and I keep getting SyntaxError: invalid syntax

In the Python Shell, >>> is the command prompt. It is not part of the code.

>>> 17 < 328    <- command expression
True            <- interpreter response
>>>

I don’t really get this exercise.
The True and False values for the booleans are already set and even if I change them all to the opposite value it still checks the instruction as completed.

Can someone explain what exactly im supposed to do because i am confused

edit: okay i restarted the exercise and the values aren’t given anymore.
Still confused because if I set all of them to True which would be wrong, it still checks the box.
Doesn’t this code just say that

xy = True/False
so if I would be asking the programm if

xy == or != True/False
it would spit out the corresponding value based on what I gave it earlier?

also the next exercise is the same. Have to restart and True/False are both correct.

1 Like

Same! I saw the answers just sitting there, very strange, seems like a bug.