Skip to main content
The National Cipher Challenge

Reply To: 9B

#99083
Sofia_Dey_Choudhury
Participant

This was my code but it returns gibberish
# Define the key
key = {
“/|||\\”: “A”,
“/||\\|”: “B”,
“|/||\\”: “D”,
“/|\\||”: “E”,
“|/|\\|”: “F”,
“||/|\\”: “G”,
“/\\|||”: “H”,
“|/\\||”: “I”,
“||/\\|”: “K”,
“|||/\\”: “L”,
“\\/|||”: “M”,
“|\\/||”: “N”,
“||\\/|”: “O”,
“|||\\/”: “P”,
“\\|/||”: “R”,
“|\\|/|”: “S”,
“||\\|/”: “T”,
“\\||/|”: “U”,
“|\\||/”: “W”,
“\\|||/”: “Y”
}

def decode_sequences(sequences):
decoded_message = “”
for seq in sequences:
decoded_message += key.get(seq, “?”) # “?” for unrecognized sequences
return decoded_message

# Example usage
if __name__ == “__main__”:
print(“Enter 5-letter sequences (only ‘/’, ‘|’, ‘\\’) separated by spaces:”)
user_input = input(“>>> “).split()
decoded = decode_sequences(user_input)
print(“Decoded Message:”, decoded)

Also there is a website for it (CacheSleuth) but I don’t understand why some of them are wrong. I don’t want to give up on it but then I’ve run out of ideas, and my other team member hasn’t solved anything – she doesn’t even know how the competition works!

Report a problem