Comments

User guide

Comments are not included in the practice programs so that teachers can challenge their students to add comments where it is appropriate into the program to show an understanding of how the program works. Using the commentary in the video helps with this activity and enables the student to demonstrate to their teacher what has been learned.

Students should be encouraged to add comments to their practice programs as they write them. Another popular approach to problem decomposition is to write out all the comments first and then add the code underneath each one.

We recommend students add comments for each:

  1. Program: as the first lines explaining what the program does, which version it is, and the author.
  2. Program section: identify library, global variables, constants, subprogram and main program sections.
  3. Subprogram: write a sentence that explains the purpose of the procedure or function.
  4. Identifiers: where it is not obvious what the purpose of variables and constants will be.
  5. Condition: identify what the program branch (if, elif, else and match) is for.
  6. Repetition / Iteration: identify what the loop achieves.

Registered in England and Wales: 10442992

VAT Number: 290 9845 58

Telephone: 01452 947500

Email: admin@craigndave.co.uk

Craig'n'Dave logo

Craig 'n' Dave

Bett Awards 2024 Finalist