From 9501ee882d57d0094159fe0cad59f5b57799ecc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B5=D1=80=D0=B0?= Date: Tue, 18 Mar 2025 19:52:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20data.txt,=20scr?= =?UTF-8?q?ipt.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + data.txt | 2 ++ output.txt | 2 ++ requirements.txt | 6 ++++++ script.py | 9 +++++++++ 5 files changed, 20 insertions(+) create mode 100644 data.txt create mode 100644 output.txt create mode 100644 requirements.txt create mode 100644 script.py diff --git a/.gitignore b/.gitignore index e69de29..0cafc1c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +.venv/ \ No newline at end of file diff --git a/data.txt b/data.txt new file mode 100644 index 0000000..ae52149 --- /dev/null +++ b/data.txt @@ -0,0 +1,2 @@ +Вода 3 +Лимонад 2 \ No newline at end of file diff --git a/output.txt b/output.txt new file mode 100644 index 0000000..70662a5 --- /dev/null +++ b/output.txt @@ -0,0 +1,2 @@ +ВОДА 3 +ЛИМОНАД 2 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a006c6d --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +numpy==2.2.4 +pandas==2.2.3 +python-dateutil==2.9.0.post0 +pytz==2025.1 +six==1.17.0 +tzdata==2025.1 diff --git a/script.py b/script.py new file mode 100644 index 0000000..0d16f1f --- /dev/null +++ b/script.py @@ -0,0 +1,9 @@ +with open('data.txt', 'r', encoding='utf-8') as file: + lines = file.readlines() + +upper_lines = [line.upper() for line in lines] + +with open('output.txt', 'w', encoding='utf-8') as file: + file.writelines(upper_lines) + +print("Файл output.txt успешно создан.")