-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcypher.py
More file actions
38 lines (35 loc) · 897 Bytes
/
Copy pathcypher.py
File metadata and controls
38 lines (35 loc) · 897 Bytes
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
cypher=input("What letter do you want you cypher rotation to start on? ").lower()
message=input("What is the message you want to code? ")
alphabet=['a', 'b', 'c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
alphaC=[]
mesS=[]
messageC=[]
x=0
y=0
difference=0
difP=0
#makes cyph
for a in range(0, 26):
if alphabet[x]==cypher:
x+=1
place=y
difference=25-abs(x-26)
for b in range(y, 26):
alphaC.append(alphabet[place])
place+=1
for c in range(0, difference):
alphaC.append(alphabet[difP])
#print(difP)
#print(c)
#print(alphaC)
difP+=1
else:
x+=1
y+=1
print("Cypher: "+"".join(alphaC))
#cyph message
for a in range(len(message)):
print(a)
mesS.append(message(a))
print(mesS)
print(messageC)