Complete a Code Challenge
Write or fix code and check it against test cases.
Code challenges give you a prompt, starter code, and a set of test cases. Your code must produce the expected output to pass.
- 1Open the activity and read the prompt and expected output.
- 2Edit the starter code in the editor.
- 3Click Run tests to check your solution against each test case.
- 4Green ticks mean a test passed; fix any that fail and re-run.
Read the error messages
Failed tests show what your code output versus what was expected — use that to find the bug.
