Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Decrypted message one successfully
  • Loading branch information
haa19018 committed Jan 29, 2024
1 parent 8847839 commit ad81ded
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions decrypt_message_one.py
Expand Up @@ -41,3 +41,16 @@ encrypted_message = encrypted_file.readline()
encrypted_file.close()

# Write code below

decryption_cipher = {v: k for k, v in cipher.items()} # Reverse cipher

print("Encrypted Message:", encrypted_message) # some debugging

decrypted_message = ""
for char in encrypted_message:
if char in decryption_cipher:
decrypted_message += decryption_cipher[char]
else:
decrypted_message += char

print("Decrypted Message:", decrypted_message)

0 comments on commit ad81ded

Please sign in to comment.