Back to English for Coders
IntermediateTeenagers

Punctuation for Clarity

Proper punctuation is essential for clarity in technical writing. Misplaced commas can change the meaning of a sentence entirely.

**Commas (,):** Use commas to separate items in a list, to separate clauses in a complex sentence, and to set off non-essential information.
- List: "The function requires a username, password, and token."
- Clauses: "If the connection fails, the program will retry."

**Semicolons (;):** Use a semicolon to connect two closely related independent clauses.
- Example: "The first test passed; the second one failed."

**Colons (:):** Use a colon to introduce a list, an explanation, or a quotation.
- Example: "The function returns one of three states: 'success', 'pending', or 'failure'."

Using these correctly will make your documentation and comments much easier for others to read.

Fix the Punctuation

The string `sentence` is missing a comma. Add the comma in the correct place to separate the two clauses and print the corrected sentence.