commit 82b5c000ea8112bac1aff6856d228dbc77623842 Author: Максим Date: Thu Mar 6 21:47:24 2025 +0300 Добавлены файлы data.txt, script.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8cdcbba --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +output.txt \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..fa3fadd --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Шифрование текста со сдвигом по ASCII \ No newline at end of file diff --git a/data.txt b/data.txt new file mode 100644 index 0000000..f04fd8d --- /dev/null +++ b/data.txt @@ -0,0 +1 @@ +qwertyuiop \ No newline at end of file diff --git a/script.py b/script.py new file mode 100644 index 0000000..2748cb4 --- /dev/null +++ b/script.py @@ -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)