# Posted By

toto898 on 10/11/10

# Statistics

Viewed 556 times
Favorited by 0 user(s)

# Python Challenge 1

/ Published in: Python
Save to your folder(s)

Copy this code and paste it in your HTML
`#1import string frm = "abcdefghijklmnopqrstuvwxyz"to = "cdefghijklmnopqrstuvwxyzab" data = """g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp.        bmgle gr gl zw fylbgq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle.        sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.""" print string.translate(data, string.maketrans(frm,to))  #2import string    frm = "abcdefghijklmnopqrstuvwxyz"  to = "cdefghijklmnopqrstuvwxyzab"   data = """g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp.          bmgle gr gl zw fylbgq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle.          sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj."""  result = '' for c in data:    if c in frm:        result += to[frm.index(c)]    else:        result += c print result  #3import   string s   =   " " for   c   in   t   : 	if   c   in   string.letters   : 		s   +=   chr((ord(c)   +   2   -   97)   %   26   +   97) 	else   : 		s   +=   c print   s </code>`