commit e4f3ab474283b0a741639c985bf97b9b6379a176 Author: Hladu357 Date: Mon Feb 24 17:33:52 2025 +0200 HW0 diff --git a/hw0/pt b/hw0/pt new file mode 100644 index 0000000..4b39f45 --- /dev/null +++ b/hw0/pt @@ -0,0 +1 @@ +FBGURAVPUBFRNABGURECEBSRFFVBANAQYRNEARQGBCVYBGNVECYNARFVUNIRSYBJANYVGGYRBIRENYYCNEGFBSGURJBEYQNAQVGVFGEHRGUNGTRBTENCULUNFORRAIRELHFRSHYGBZR diff --git a/hw0/script.py b/hw0/script.py new file mode 100644 index 0000000..2adfd83 --- /dev/null +++ b/hw0/script.py @@ -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)