Добавлены файлы data.txt, script.py

This commit is contained in:
Максим Максимов 2025-03-06 21:47:24 +03:00
commit 82b5c000ea
4 changed files with 10 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
output.txt

1
README.md Normal file
View File

@ -0,0 +1 @@
Шифрование текста со сдвигом по ASCII

1
data.txt Normal file
View File

@ -0,0 +1 @@
qwertyuiop

7
script.py Normal file
View File

@ -0,0 +1,7 @@
with open("data.txt", "r", encoding="utf-8") as file:
text = file.read()
shifted_text = "".join(chr(ord(c) + 1) for c in text)
with open("output.txt", "w", encoding="utf-8") as file:
file.write(shifted_text)