Created
February 25, 2013 20:51
-
-
Save ildus/5033169 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
LAT = ['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'] | |
CODE = """ | |
FUBSWRJUDSKLF NHBV DUH DQDORJRXV WR WKH KRXVH DQG FDU NHBV ZH FDUUB LQ RXU | |
GDLOB OLYHV DQG VHUYH D VLPLODU SXUSRVH | |
""" | |
#k == 3 | |
#CRYPTOGRAPHIC KEYS ARE ANALOGOUS TO THE HOUSE AND CAR KEYS WE CARRY IN OUR DAILY LIVES AND SERVE A SIMILAR PURPOSE | |
for k in xrange(1, 100): | |
result = '' | |
for c in CODE: | |
if c in LAT: | |
code = LAT.index(c) | |
x = (code - k + len(LAT)) % len(LAT) | |
result += LAT[x] | |
else: | |
result += ' ' | |
print k, " ", result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment