# Comment

> A note in the code for people. The computer skips it.

**Field:** Software Development  
**Category:** Programming Concepts  
**Also known as:** Code Comment

## Think of it like

Think of it like a sticky note on a recipe. The cook reads it, but it is not a step.

## Definition

A comment is a note inside the code that the computer skips. It is written for people, not for the machine. In Python a comment starts with #, and in many other languages with //. Good comments say why the code does something, not what it does. The computer runs the same program with or without them.

## Example

Lucy writes # prices include tax above one line. Next year a new teammate reads it and does not add the tax twice.

## Example code

```python
# Prices already include 20% tax
total = price * quantity
```

The first line is for people. The computer only runs the second.

## Why it matters

Code is read far more often than it is written. A short note saves the next reader an hour of guessing.

## Common mistake

Writing comments that repeat the code, like add one to x. Say why, not what.

## Three principles

- **For people.** The computer skips every comment.
- **Say why.** The code already shows what it does.
- **Keep it true.** An old, wrong comment is worse than none.

## Related terms

- [Source Code](https://learn.benibix.com/term/development/source-code)
- [Syntax](https://learn.benibix.com/term/development/syntax)
- [Statement](https://learn.benibix.com/term/development/statement)
- [Software Developer](https://learn.benibix.com/term/development/software-developer)

## Taught in

- [Statements and Expressions](https://learn.benibix.com/learn/development-concepts/statements-and-expressions): Programming Basics, 3/18

---

Source: https://learn.benibix.com/term/development/comment
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
