Forgot your password?
typodupeerror
Programming

Journal Journal: Python Challenge 1

###Puzzle 1#########################################################################################################
from string import maketrans

##Creating the Method##
#First, lets make a string of the alphabet.
FromABC = 'abcdefghijklmnopqrstuvwxyz'

#Because we know that every letter has to go down 2, Make another alphabet string starting with c, and ending with b
ToCDE = 'cdefghijklmnopqrstuvwxyzab'

#And from these 2 strings, we can make a method. maketrans calls both strings like this: (Before, After)
#Basically, The first letter in FromABC will be replaced with the first letter in ToCDE.
#This is the same for the second letter and so on.
DecryptionMethod = maketrans(FromABC, ToCDE)

#Now we need a string with the text that will be translated.
Puzzle1Code = """g fmnc wms bgblr rpylqjyrc gr zw fylb.
rfyrq ufyr amknsrcpq ypc dmp.
bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle.
sqgle qrpgle.kyicrpylq() gq pcamkkclbcb.
lmu ynnjw ml rfc spj."""

#Finally we will create the result. Basically it says the Puzzle1Code will use the function "translate()" that calls
#upon the method known as "DecryptionMethod"
DecodedMessage = Puzzle1Code.translate(DecryptionMethod)

print """
Solution 1:""", DecodedMessage

#Now just take "map" which is in the url, and apply the method: 'map'.translate(DecryptionMethod)
Programming

Journal Journal: Python Challenge 0

###Puzzle 0#########################################################################################################
Level0 = 2**38
print "Solution 0:"
print Level0
#You simply have to print the solution in the url to proceed.
User Journal

Journal Journal: In the beginning...

Well I am sure that the subject has been used before, but because I have a biblical background of sorts, so it feels appropriate to me. Well I just turned 20, and decided to start a blog/journal at my favourite place for Linux news. Me and my nice new System76 laptop are ready to hit the Python Language, so I am recording my progress. Why not start with the python challenge

Slashdot Top Deals

In seeking the unattainable, simplicity only gets in the way. -- Epigrams in Programming, ACM SIGPLAN Sept. 1982

Working...