Well, after reading Digital Fortress by Dan Brown l really wanted to make a cypher maker and decrypter. To make this i had to make a cypher language. I made it at first but when the user inputs the text i am confused how can i convert the input to a cypher?
`#cypher by GDD
cyp = {
1 : '',
0 : ' ',
2.1 : 'a',
2.2 : 'b',
2.3 : 'c',
2.4 : '2',
3.1 : 'd',
3.2 : 'e',
3.3 : 'f',
3.4 : '3',
4.1 : 'g',
4.2 : 'h',
4.3 : 'i',
4.4 : '4',
5.1 : 'j',
5.2 : 'k',
5.3 : 'l',
5.4 : '4',
6.1 : 'm',
6.2 : 'n',
6.3 : 'o',
6.4 : '6',
7.1 : 'p',
7.2 : 'q',
7.3 : 'r',
7.4 : 's',
7.5 : '7',
8.1 : 't',
8.2 : 'u',
8.3 : 'v',
8.4 : '8',
9.1 : 'w',
9.2 : 'x',
9.3 : 'y',
9.4 : 'z',
0.1 : '0'
}
inpu = input("To encrypt text press \'E\'\n To decrypt text press press \'D\' : ")
ch = inpu.upper()
if ch == "E":
txt = input('Please input text to encrypt it : ')
var = txt.len()
for i in range(var):
#I am really confused after this`
You are almost there. It's an interesting one, so I'm going to help. Here's an example:
If you input "abc" for encrypting text, your output will be:
If you input "8.1 8.2" (Make sure it's spaced, this is just an example, I can't fine tune everything), your output will be: