Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from string import maketrans # Required to call maketrans function.
- def rot_n()
- print 'Using positive numbers only'
- a = int(raw_input('Enter amount to ROT text by >\n'))
- intab = "abcdefghijklmnopqrstuvwxyz"
- outtab = intab[a:]+intab[:a]
- trantab = maketrans(intab, outtab)
- str1 = raw_input('Type in text to be ROTted >\n')
- str2 = str1.lower()
- print '\n------RESULT------\n'
- print str2.translate(trantab);
- rot_n()
- """ Simple ROT encryption """
Advertisement
Add Comment
Please, Sign In to add comment