Skip to content
The Lumenary

Practice · Grades 3–5

Secret codes

Secret codes

Warm-upHuman

This message was made with a Caesar shift of 3 (each letter moved 3 places forward): KHOOR. What does it say?

Choose one

Secret codes

Warm-upHuman

Encode ZEBRA with a Caesar shift of 3.

Choose one

Secret codes

CoreHuman

A message was encoded by shifting every letter 7 places forward. Ngozi's alphabet wheel only turns forward. By how many places forward must she shift to decode it? (Give a number from 1 to 25.)

Secret codes

CoreHuman

Tobi wants to break a Caesar cipher by trying every possible shift. How many different shifts does he need to try that actually change the message?

Secret codes

CoreHuman

Chidi shifts a message 10 places forward, and then shifts the result 20 places forward. Which single shift (a number from 0 to 25) would have done the same?

Secret codes

CoreHuman

In a long message made with a Caesar shift, the most common letter is K. If K stands for E, how many places forward was each letter shifted?

Secret codes

CoreHuman

A long English message was coded with a substitution cipher (a scrambled alphabet). In the coded message the most common letter is Q. Which plain letter is Q most likely to stand for?

Choose one

Secret codes

StretchHuman

Kai sends KHOOR ZRUOG using a Caesar shift. "Nobody can read it," he says. "It looks like complete nonsense!" Is his message safe?

Choose one

Secret codes

StretchFormal

In Lean, caesar k message encodes a message with a Caesar shift by k. Which statement says that shifting by 26 − k decodes every message encoded with key k (for any key k from 0 to 26)?

Choose one

Secret codes

StretchComputational

Write a function shift_letter(letter, k) that shifts one capital letter k places forward, wrapping round after Z. For example shift_letter("A", 3) is "D" and shift_letter("Y", 3) is "B". Use the string ALPHABET: ALPHABET.index(letter) gives the letter's number (A = 0), and ALPHABET[n] gives the letter with number n. In Python, n % 26 is the remainder when n is divided by 26.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.