Comments with // (7c)
Starts a comment that runs to the end of the line. It explains the code to the reader but is not part of the algorithm, so it is ignored when run.
Understanding Comments with // (7c) in IGCSE Computer Science Paper 2
What it does: Pseudocode has no multi-line comment symbol, so every line of the comment starts with its own //. The // line explains the purpose of the IF statement but is not an instruction. The IF line is the algorithm. A comment is not part of the algorithm. It helps people read the code, so it is ignored when run. A comment can sit on its own line above the code it explains. It can also go at the end of a line. A comment runs only to the end of the line. Each extra line of comment needs its own //.
Common mistakes: Pseudocode comments start with //, not #. The line should be Total ← Price * 2 // doubled. A comment needs two slashes. A single / is not a comment. The line should be // Check for an adult.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 136–145) and word search (Modules 123–145).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
//Fill in the Blanks
Spot the Error
Student with a class code? Join your class →