Secret codes
Warm-upHumanThis message was made with a Caesar shift of 3 (each letter moved 3 places forward): KHOOR. What does it say?
This message was made with a Caesar shift of 3 (each letter moved 3 places forward): KHOOR. What does it say?
Encode ZEBRA with a Caesar shift of 3.
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.)
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?
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?
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?
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?
Kai sends KHOOR ZRUOG using a Caesar shift. "Nobody can read it," he says. "It looks like complete nonsense!" Is his message safe?
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)?
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.