CEMC Banner

Problem of the Week
Problem B
Coding Conundrum

Viktoria is writing a program that people can use to guess her favourite number, which is \(23\).

  1. Use the following blocks to create pseudocode for Viktoria’s program. Note that you may not need to use all of the blocks.

    say “That’s not correct.”

    else

    if guess \(\ne 23\)

    say “That’s correct.”

    say “Guess my secret number!”

    if guess \(= 23\)

  2. Using the additional blocks below, modify your pseudocode so that if the user’s guess is incorrect, then the program will tell them whether their guess is too high or too low.

    say “That’s too low.”

    else if guess \(< 23\)

    say “That’s too high.”

    if guess \(> 23\)

Not printing this page? You can use our interactive worksheet.


Theme: Computational Thinking