From 1ec929f17ee24f3abd7731fcc789ca216e1e3040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=9A=D0=BE=D0=B9=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 11 Mar 2025 19:12:04 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore.md | 2 ++ README.md | 4 +--- data.txt | 4 ++++ output.txt | 4 ++++ script.py | 9 +++++++++ 5 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 .gitignore.md create mode 100644 data.txt create mode 100644 output.txt create mode 100644 script.py diff --git a/.gitignore.md b/.gitignore.md new file mode 100644 index 0000000..c172b57 --- /dev/null +++ b/.gitignore.md @@ -0,0 +1,2 @@ +.vevn/ +output.txt \ No newline at end of file diff --git a/README.md b/README.md index 21464f7..a941aa9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1 @@ -Койков Антон Иванович -Андрей -Янактаева Виктория Евгеньевна \ No newline at end of file +Вариант : Установите numpy и pandas \ No newline at end of file diff --git a/data.txt b/data.txt new file mode 100644 index 0000000..aab02e2 --- /dev/null +++ b/data.txt @@ -0,0 +1,4 @@ +Молоко +Хлеб +Колбаса +Чехословакия \ No newline at end of file diff --git a/output.txt b/output.txt new file mode 100644 index 0000000..5168043 --- /dev/null +++ b/output.txt @@ -0,0 +1,4 @@ +МОЛОКО +ХЛЕБ +КОЛБАСА +ЧЕХОСЛОВАКИЯ \ No newline at end of file diff --git a/script.py b/script.py new file mode 100644 index 0000000..8cb2c5d --- /dev/null +++ b/script.py @@ -0,0 +1,9 @@ +with open('data.txt', 'r', encoding='utf-8') as input_file: + lines = input_file.readlines() + +upper_case_lines = [line.upper() for line in lines] + +with open('output.txt', 'w', encoding='utf-8') as output_file: + output_file.writelines(upper_case_lines) + +print("Данные успешно преобразованы и записаны в output.txt.")