Login or Create an Account to view the mark scheme, comment, and add to a test
In cryptography, a Caesar cipher is one of the simplest and most commonly known cryptographic techniques. The Caesar cipher encodes text by replacing each letter with another from a fixed number of positions left or right along a cyclic alphabetic sequence. The first letter in the alphabet is assigned index position 0.
For example, a Caesar cipher with a left shift of 7 applied to English text will encode the letters H and D to A and W respectively.
Given the array of all lowercase characters in the English alphabet (in alphabetic order) of length 26 called ALPHABET, an array of characters of length 5 called TEXT as well as a function called ALPHAX as defined below
[4]
ALPHABET = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
TEXT = ["a","p","p","l","e"]
function ALPHAX(LETTER) I = 0 FOUND = false loop while I < 26 and FOUND = false if ALPHABET[I] = LETTER then FOUND = true end if I = I + 1 end loop return I end function
Write pseudocode to encode TEXT using a Caesar cipher with a left shift of 9. Implement your algorithm in-place, that is, replace the characters in TEXT with their encoded equivalents.

Short Answer4 MarksPremium
13 Uses73 Views0 Likes