Practice question · Multiple choice
A beginner writes a working program and cannot explain why it works. Why is that a problem even though the tests pass?
Hints
- Ask what happens the first time the program must be changed.
- Understanding is what lets you predict. Predict what?
Show the answer
D. Because they cannot predict what will break it
Why
Working is a snapshot; understanding is what lets you predict behaviour under change. Without it, the first modification or unusual input produces a failure with no model to reason from, which is why tracing by hand and explaining code aloud are skills worth practising deliberately.
Practise Integrated Introductory Programming Practice
The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.
More questions on Integrated Introductory Programming Practice
- Select every input that should be in the test suite for the passing-and-average task.
- Order the structured approach to the task: read a list of exam scores and report how many passed and the…
- A program that counts passing scores needs a loop, a conditional and an accumulator, and removing any one of…
- Passing is a score of 50 or more. Sort each score by whether it passes or fails.