AP CSP Day 36: Program Documentation
Share
Big Idea 1
Day 36 Practice
Focus: Program Documentation
Practice Question
Which comment provides the MOST useful documentation?
count ← 0Why This Answer?
Comment C explains the PURPOSE and CONTEXT - what count represents and why we're tracking it. Good documentation explains why, not just what.
Why Not the Others?
A) Merely restates the code.
B) Generic - doesn't explain what's being counted.
D) Too vague to be useful.
Common Mistake
Watch Out!
Writing comments that just repeat what code does. Comments should explain WHY and provide context.
AP Exam Tip
Best comments explain purpose, assumptions, and non-obvious behavior - not just code repetition.