Ever heard of the 5x5 secret message system? If not, basically it's a 5x5 grid with all letters of the alphabet in order, without k because c is represented to make the k sound only. Google it if you need to. A letter is identified by Row-Column. All values are in caps. Try: 1-3,4-4,2-1,{,4-4,2-3,4-5,3-2,1-2,4-3,_,4-5,3-5,}
def decrypt_ciphertext(ciphertext): grid = [ "ABCDE", "FGHIJ", "LMNOP", "QRSTU", "VWXYZ" ] tokens = ciphertext.split(',') plaintext = "" for token in tokens: if "-" in token: row, col = map(int, token.split('-')) plaintext += grid[row - 1][col - 1] else: plaintext += token return plaintext ciphertext = "2-2,2-3,4,1{,4-4,2-3,4-5,3-2,1-2,4-3,_,4-5,3-5," plaintext = decrypt_ciphertext(ciphertext) print("Plaintext:", plaintext)
only foam
great learned a new cipher
2 weeks ago