HW0
This commit is contained in:
commit
e4f3ab4742
|
@ -0,0 +1 @@
|
|||
FBGURAVPUBFRNABGURECEBSRFFVBANAQYRNEARQGBCVYBGNVECYNARFVUNIRSYBJANYVGGYRBIRENYYCNEGFBSGURJBEYQNAQVGVFGEHRGUNGTRBTENCULUNFORRAIRELHFRSHYGBZR
|
|
@ -0,0 +1,14 @@
|
|||
f = open("pt", "r")
|
||||
cipher = f.read()
|
||||
text = ''
|
||||
for c in cipher:
|
||||
#tmp = chr( (ord(c) - ord('A') + 13) % 26 + ord('A') )
|
||||
#text += tmp
|
||||
#print( c, "->", tmp)
|
||||
shifted = ord(c)+13
|
||||
if(shifted >= 65+26):
|
||||
text += chr(shifted-26)
|
||||
else:
|
||||
text += chr(shifted)
|
||||
print(ord(c))
|
||||
print(text)
|
Loading…
Reference in New Issue