Make it as weird or complex as you want. Extra cool points are awarded if you also supply a decipher function. I'll provide an extremely trivial ciphering program as an example:
def cipher(givenString):
retString = ""
for letter in givenString:
if letter.isalpha(): #skip non a-z characters
if letter == 'z':
retString += 'a'
elif letter == 'Z':
retString += 'A'
else:
retString += chr(ord(letter)+1)
else:
retString += letter
return retString
def deCipher(givenString):
retString = ""
for letter in givenString:
if letter.isalpha(): #skip non a-z characters
if letter == 'a':
retString += 'z'
elif letter == 'A':
retString += 'Z'
else:
retString += chr(ord(letter)-1)
else:
retString += letter
return retString
I'm looking for creativity! Let's see what you got!
UPDATE:
Posting some ciphered output might be a good idea.
This post has been edited by atraub: 14 February 2011 - 02:49 PM

New Topic/Question
Reply



MultiQuote






|