Skip to content

Commit 3b37920

Browse files
authored
Update Caesar_Cipher.py
1 parent c685d69 commit 3b37920

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Cryptography/Caesar_Cipher.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
"""Aim: Given a string S , encrypt or decrypt it as per the choice entered by the user using Caesar Cipeher Substitution Method
2+
3+
Input Format:
4+
1. The first line provides an option to the user to choose either to encrypt/decrypt
5+
2. In the second line the user inputs the string as per his choice given in part 1.
6+
"""
7+
8+
9+
10+
11+
12+
113
from random import choice
214

315
def decrypt(encrypted_string,key_val):
@@ -47,4 +59,4 @@ def encrypt(input_string,key_val):
4759
key_val = int(input('Enter the key value '))
4860
print('Decrypted string is : ' + decrypt(encrypted_string,key_val))
4961

50-
62+

0 commit comments

Comments
 (0)