这就是我所拥有的。
"""
Author: Michael Wellman (wellmanm)
Title: pa10.py
Description: Deciphering a document using pennymath.
"""
def decode(inputfile,outputfile):
**inputfile = open("superDuperTopSecretStudyGuide.txt","rU").read()
outputfile = open("translatedguide.txt","w")**
count = 0
aList = []
for words in inputfile:
aList.append(words)
charCount = len(aList)
**outpufile.write(aList)**
while count<charCount:
print aList[count],
if (aList[count].isalpha()):
if (ord(aList[count])>90):
count = count + ord(aList[count])-95
else:
count = count + ord(aList[count])-63
else:
if (aList[count].isdigit()):
count = count + ord(aList[count])-46
else:
count = count + 6
**inputfile.close()
outputfile.close()**
txt 文件来自我的教授:P
我相信,加粗的部分是最重要的。
有什么想法吗?