-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathencryption.py
43 lines (41 loc) · 1 KB
/
encryption.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# THis will encrypt
#
# message= input("Enter the message to Decrypt: ")
# key= int(input("Enter the key: "))
# words= list(message)
# for i in range(len(words)):
# ch= words[i]
# # print(ch)
# if (ch>'a') and (ch<'z'):
# i-= key
# if (ch<'a'):
# i+= 'z'-'a'+1
# words[i] =ch
# elif (ch>='A') and (ch<='Z'):
# i-= key
# if(ch> 'a'):
# i+='Z'-'A'+1
# words[i]= ch
#
# for i in range(len(words)):
# print(words[i],end='')
# message= input("Enter the message to encrypt: ")
# key= int(input("Enter the key: "))
# words= list(message)
# for i in range(len(words)):
# ch= words[i]
# # print(ch)
# if (ch>'a') and (ch<'z'):
# i+= key
# if (ch>'z'):
# i-= 'z'+'a'-1
# print(i)
# words[i] =ch
# elif (ch>='A') and (ch<='Z'):
# i+= key
# if(ch> 'Z'):
# i-='Z'+'A'-1
# words[i]= ch
#
# for i in range(len(words)):
# print(words[i],end='')