Practice question · Select all that apply
The lesson says an algorithm must be finite and definite. Select every description that violates at least one of those two requirements.
Hints
- Finiteness means it always stops; definiteness means every step is precise.
- Being in pseudocode breaks neither rule, pseudocode is the normal way to state an algorithm.
Show the answer
- B. A procedure that may loop forever on some inputs
- C. An instruction that says 'do whatever seems best'
- D. A step that says 'pick a good value somehow'
Why
Looping forever breaks finiteness; 'somehow' and 'whatever seems best' break definiteness. Pseudocode and a clear if/else break neither, the lesson explicitly says algorithms are usually described in pseudocode.
Practise What Makes an Algorithm Good
The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.
More questions on What Makes an Algorithm Good
- An O(n log n) sort loses to an O(n²) insertion sort on a 20-element array, and every production sort library…
- Match each quality or property to its meaning.
- Order the recommended design workflow, which puts correctness before speed.
- A set of instructions counts as a genuine algorithm only if it is finite (it always stops) and definite…