Exam-style question
Try this first
Explain two advantages of using named constants. Use the example of a program that uses the same maximum number of attempts in several places.
Answer and explanation
Concise answer
A named constant can improve readability because a name such as MAX_TRIES communicates the purpose of the value more clearly than repeatedly writing 3.
Why this is correct
The answer identifies meaningful naming and easier updating as advantages. It also links those advantages to the stated situation, rather than merely listing them. The explanation must remain focused on named constants and their use in a program.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
