From 7b93f8f824b738daa2b02fe8b4f17833f7c68a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=BE=D1=80=D0=BE=D1=87=D0=BD=D1=8B=D0=B9=20=D0=93?= =?UTF-8?q?=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D0=B8=D0=B9?= Date: Tue, 4 Mar 2025 21:51:20 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB=20=D1=84?= =?UTF-8?q?=D0=B0=D0=B9=D0=BB=D1=8B=20data.txt=20=D0=B8=20script.py=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=B8=D0=B3=D0=BD=D0=BE=D1=80=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=20out?= =?UTF-8?q?put.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- data.txt | 1 - requirements.txt | 6 ++++++ script.py | 25 ------------------------- 4 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 data.txt create mode 100644 requirements.txt delete mode 100644 script.py diff --git a/.gitignore b/.gitignore index 0cafc1c..c136cf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.venv/ \ No newline at end of file +.venv/ +output.txt \ No newline at end of file diff --git a/data.txt b/data.txt deleted file mode 100644 index 24dd0fe..0000000 --- a/data.txt +++ /dev/null @@ -1 +0,0 @@ -Это тест моего скрипта на python для задания по учебной практике \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..de6c89b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +numpy==2.2.3 +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 deleted file mode 100644 index 619d752..0000000 --- a/script.py +++ /dev/null @@ -1,25 +0,0 @@ -def main(): - choice = input(" Выберите 'u' для перевода в верхний регистр или 'l' для перевода в нижний регистр: ").strip().lower() - - try: - with open('data.txt', 'r', encoding='utf-8') as infile: - data = infile.read() - except FileNotFoundError: - print("Файл data.txt не найден.") - return - - if choice == 'u': - output_data = data.upper() - elif choice == 'l': - output_data = data.lower() - else: - print("Некорректный ввод. Пожалуйста, введите 'u' или 'l'.") - return - - with open('output.txt', 'w', encoding='utf-8') as outfile: - outfile.write(output_data) - - print("Результат записан в файл output.txt") - -if __name__ == "__main__": - main()