Catestia mathematics testsCatestia

Test

Loops and problem decomposition

Run and reverse repeated programs, apply conditions and nested loops, and break a problem into solution steps.

Questions: 8Estimated time: ~ 16 min.
Loops and problem decomposition
Start a test

Start a test »

Time left: 00:00:00

Best results on this test

Top 10 registered students. Only each student’s best result in the period counts.

Create account

🏅 Top 10 in the last 30 days

No results yet. Be the first!

Sample questions

  1. The commands are shown below. Each arrow means one step in that direction. How many times must the block “___” repeat to produce all the shown commands?
  2. Start at S facing the arrow. Repeat ___ times: 1) move forwards an unknown but constant number of steps; 2) turn right a quarter turn. The program ends at F. How many forward steps are needed per repetition? The gap between adjacent grid lines is one step.
  3. Start at ___. Repeat ___ times: multiply the current number by ___, then subtract ___. What is the final number?
  4. There are ___ groups of ___ pupils and ___ accompanying adults. Everyone needs a ticket costing ___ Eur. Plan: 1) pupils: ___ × ___ = ___; 2) ?; 3) multiply the total number of people by the ticket price. Which operation should be applied to the pupil count in step 2?
  5. One robot move consists of ___ steps forwards, then ___ steps backwards. The robot repeats this move ___ times. How many steps from its starting position will it finish?

Repeated commands and solution plans

A repeated block performs all its commands the stated number of times. A turn changes the direction of the next movement, so track both position and facing. In nested repetition, the entire inner block runs again each time the outer block repeats.

Conditions and working backwards

In a conditional loop, check before each step whether to continue. When processing a list, apply only the appropriate operation to each number. Recover an unknown starting number from the final result by using inverse operations in reverse order. Break a word problem into finding intermediate quantities and calculating the final result.

A cat explains a mathematics task at a board