This study notes covers Deep Dive: Naming Rules within Variables & Constants for GCSE Computer Science. Revise Variables & Constants in Programming for GCSE Computer Science with 15 exam-style questions and 10 flashcards. This topic appears less often, but it can still be a useful differentiator on mixed-topic papers. It is section 4 of 6 in this topic. Use this study notes to connect the idea to the wider topic before moving on to questions and flashcards.
Topic position
Section 4 of 6
Practice
15 questions
Recall
10 flashcards
Deep Dive: Naming Rules
Good variable names:
- Meaningful:
playerScorenotx - Start with letter or underscore, not number
- No spaces - use camelCase or snake_case
- No reserved words (if, while, for, etc.)
- Case sensitive:
Score≠score
Why use constants?
- Prevents accidental changes
- Makes code more readable
- Easy to update in one place