Today's Accomplishments:
-dropped off transcript for SMART Scholarship
-had a good run
-accompanied R to her interview
Things I could have done better:
-should have made time to get more coding in
Tuesday, November 23, 2010
Tuesday, November 2, 2010
Python Challenge #1
Solved Python challenges 0 and 1.
Like the solution I came up with to #1.
Posted below.
****************************************
encrypted_string = "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."
alphabet_list = "abcdefghijklmnopqrstuvwxyzab"
numbers = "123456789"
decrypted_string = ""
for i in encrypted_string:
if i not in alphabet_list:
i = i
decrypted_string += i
else:
first_a_loc = alphabet_list.find(i)
second_a_loc = first_a_loc + 2
decrypted_string += alphabet_list[second_a_loc]
print decrypted_string
Like the solution I came up with to #1.
Posted below.
****************************************
encrypted_string = "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."
alphabet_list = "abcdefghijklmnopqrstuvwxyzab"
numbers = "123456789"
decrypted_string = ""
for i in encrypted_string:
if i not in alphabet_list:
i = i
decrypted_string += i
else:
first_a_loc = alphabet_list.find(i)
second_a_loc = first_a_loc + 2
decrypted_string += alphabet_list[second_a_loc]
print decrypted_string
Subscribe to:
Posts (Atom)