Добавлены файлы input.txt, script.py

This commit is contained in:
Игорь Анохин 2025-03-05 21:09:08 +03:00
parent 2b4bb2487e
commit 9b1d4156f6
3 changed files with 14 additions and 0 deletions

3
input.txt Normal file
View File

@ -0,0 +1,3 @@
print("Hello, world!")
System.out.print("Hello, world!");
std::cout<<"Hello, world!";

0
output.txt Normal file
View File

11
script.py Normal file
View File

@ -0,0 +1,11 @@
with open("output.txt", "r", encoding="utf-8") as file:
lines = file.readlines()
# Преобразование: строки в верхний регистр
processed_lines = [line.upper() for line in lines]
# Запись результата в output.txt
with open("output.txt", "w", encoding="utf-8") as file:
file.writelines(processed_lines)
print("Данные успешно обработаны и сохранены в output.txt!")