Comments
Computer Science: KS3, topic 2.1.2
Comments
Comments are lines of code that are ignored completely by the computer.

What are comments?
- A comment is a line of code that is completely ignored by the computer.

Purpose of comments
- Comments can be used to add description to your code to make it easier for other people to understand.
- Comments can also be used to leave notes and reminders to yourself as you work on a complex program.

How to comment
- To write a comment in most languages, you must use a special character.
- The character tells the computer to ignore the rest of the line:
- In Python, that character is a #.
- In C-style languages it is //.
- The exact character depends on the language being used.
Test yourself on Comments
How do you start a comment in Python?
How do you start a comment in a C-style language?
Select the true statement about comments in each pair.
A line of code starts with the symbol //. Which type of programming language uses this comment style?
A line of code starts with the symbol #. Which type of programming language uses this comment style?