Добавлены файлы 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
View File
@@ -0,0 +1 @@
output.txt
+1
View File
@@ -0,0 +1 @@
Шифрование текста со сдвигом по ASCII
+1
View File
@@ -0,0 +1 @@
qwertyuiop
+7
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)