Practice Your answers and score aren't saved. Back to the activity

Algorithms: Following Steps in Order

Directions

Each question gives you a set of steps to follow. Do the steps in order, one at a time, and keep track of the number as it changes.

Question 1 of 8Answered

Ella's video game uses these steps to work out how many bonus stars a player earns at the end of a level.

  1. Set stars to 4.
  2. Add 6 to stars.
  3. Multiply stars by 3.
  4. Subtract 5 from stars.

How many stars are there after step 4?

Enter a number.

Question 2 of 8Answered

A robot starts on square 0 of a long path, and the squares are numbered 0, 1, 2, 3 and so on. Moving forward takes the robot toward bigger numbers, and moving back takes it toward smaller numbers.

  1. Move forward 6 squares.
  2. Move back 1 square.
  3. Move forward 7 squares.
  4. Move back 3 squares.

On which square does the robot stop?

Enter a number.

Question 3 of 8Answered

Tomas starts with the number 6. He will do two steps, "Add 4" and "Multiply by 2," one after the other. Which order of the two steps gives him 20 at the end?

Choose one answer.

Question 4 of 8Answered

A treasure hunt app turns a secret clue into a locker number by following these steps in order.

  1. Set clue to 24.
  2. Divide clue by 4.
  3. Add 9 to clue.
  4. Divide clue by 3.
  5. Multiply clue by 2.

What is the value of clue after step 5? That number is the locker number.

Enter a number.

Question 5 of 8Answered

Jamal is writing steps that should finish with total equal to 20, but he forgot to write step 2.

  1. Set total to 2.
  2. (missing step)
  3. Multiply total by 4.

Which step should go in the place of step 2?

Choose one answer.

Question 6 of 8Answered

Sofia wrote a program that counts beads for a bracelet pattern, and it follows these steps.

  1. Set beads to 1.
  2. Repeat these two actions 3 times: add 2 to beads, then double beads.
  3. Subtract 6 from beads.

What is the value of beads after step 3?

Enter a number.

Question 7 of 8Answered

These steps use two numbers named red and blue. In these steps, "Add red to blue" changes only blue, and "Multiply red by blue" changes only red.

  1. Set red to 5.
  2. Set blue to 3.
  3. Add red to blue.
  4. Multiply red by blue.

What is the value of red after step 4?

Enter a number.

Question 8 of 8Answered

A watering robot decides how many cups of water a plant gets by following these steps. Step 3 checks the value of cups every time, right after step 2 runs.

  1. Set cups to 3.
  2. Add 4 to cups.
  3. If cups is less than 20, go back to step 2. If not, go on to step 4.
  4. Subtract 2 from cups.

What is the value of cups after step 4?

Enter a number.

All done? Finish.

8 questions are not answered yet. Pick a number to go back to it.

Finish to see your score and every answer.

0 of 8 answered