Channel | Publish Date | Thumbnail & View Count | Download Video |
---|---|---|---|
Publish Date not found | 0 Views |
import randomly
Import string
Characters /" /" String.Punctuation marks String.Numbers String.ASCII letters
Character list (characters)
Keycharacter.copy()
random.shuffle(key)
#ENCRYPTION
plain_text input(/"Enter a message to encrypt: /")
Ciphertext /"/"
for letter in plain text:
Index character.Index(letter)
Ciphertext Key[Index]
print(f/"original message: {Plain_Text}/")
print(f/"encrypted message: {cipher_text}/")
#DECIPHER
cipher_text input(/"Enter a message to encrypt: /")
Plain text /"/"
for letters in the ciphertext:
Index key.Index(letter)
Plaintext characters [Index]
print(f/"encrypted message: {cipher_text}/")
print(f/"original message: {Plain_Text}/")
Please take the opportunity to connect with your friends and family and share this video with them if you find it useful.