University of Waterloo Logo and CEMC Banner

2022 Beaver Computing Challenge
(Grade 5 & 6)

Questions, Answers, Explanations, and Connections


Part A

Beaver Children

Story

A beaver family has five children with different heights as shown.

The children, in order from shortest to tallest, are as follows: Qadr, Ravi, Todd, Sana, Peng.

The two tallest children and two shortest children leave.

Question

Which child remains?

  1. Qadr
  2. Ravi
  3. Sana
  4. Todd

Answer

(D) Todd

Explanation of Answer

If we order the children by height from tallest on the left to shortest on the right, we get

Peng, Sana, Todd, Ravi, Qadr.

Peng and Sana are the two tallest children. Ravi and Qadr are the two shortest children. After these four children leave, only Todd remains.

Connections to Computer Science

The given task describes a simple algorithm to determine the median (middle) value in a list of 5 values. An algorithm is a precise description of the steps needed to achieve a desired result.

Part of understanding an algorithm is the ability to trace it: that is, what happens to the input when the steps of the algorithm are followed to produce the output. Tracing can be done mentally, or by writing down key information, such as which beavers remain after each step.

Country of Original Author

Ireland