What is a code comment?

- A way to teach Karel a new word

- A way to give notes to the reader to explain what your code is doing

- A message to your teacher in code

- A place to write whatever you want in your code

1 answer

A code comment is:

  • A way to give notes to the reader to explain what your code is doing.

Code comments are used to provide clarification and context for the code, making it easier for others (or yourself in the future) to understand what the code is intended to do. They are not executed by the computer and serve purely as explanatory text.