This commit is contained in:
Hladu357 2025-02-24 17:33:52 +02:00
commit e4f3ab4742
2 changed files with 15 additions and 0 deletions

1
hw0/pt Normal file
View File

@ -0,0 +1 @@
FBGURAVPUBFRNABGURECEBSRFFVBANAQYRNEARQGBCVYBGNVECYNARFVUNIRSYBJANYVGGYRBIRENYYCNEGFBSGURJBEYQNAQVGVFGEHRGUNGTRBTENCULUNFORRAIRELHFRSHYGBZR

14
hw0/script.py Normal file
View File

@ -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)