Practice question · Select all that apply
Select every input that should be in the test suite for the passing-and-average task.
Hints
- Good suites include typical cases and the boundaries where bugs hide.
- The empty list and the exact-50 score are the two edge cases the task calls out.
Show the answer
- B. A list where every score passes
- C. A list containing a score of exactly 50
- D. An empty list
- E. A typical mixed list of scores
Why
A typical list, an empty list, an all-passing list, and a score of exactly 50 all belong, the last two probe the division-by-zero and boundary edge cases. The option that deliberately avoids both edges tests nothing the typical case does not already cover.
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
- 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…
- A beginner writes a working program and cannot explain why it works. Why is that a problem even though the…
- Passing is a score of 50 or more. Sort each score by whether it passes or fails.