How does Codecademy check my answer?


#1

Question

How does Codecademy know if my answer is right or wrong when I run my code?

Answer

Codecademy runs tests behind the scenes to ensure that your code meets the requirements of the exercise or project you’re working on. If you think you have followed them and see an error or warning, be sure that you’ve done the following:

  1. Use the same variable names requested by the instructions

  2. Assign the same values requested

  3. Look for any missing spaces, capitalization, and/or punctuation if you’re writing a string

A super common mistake is writing something like “toy story” when the behind-the-scenes tests are checking for “Toy Story”. This eye for detail comes in handy as a programmer when you’re trying to debug your own code!


FAQ: Learn Python - Python Syntax - Updating Variables
#7

There is a file called test.txt which is the code to check your answer. If you can’t see multiple files, then codecademy is behind the scenes. That is what I know.