This commit is contained in:
2026-04-18 14:42:00 +05:00
commit ef77f101fa
96 changed files with 3134 additions and 0 deletions

BIN
labPython/lab14/task_1.bin Executable file

Binary file not shown.

11
labPython/lab14/task_1.py Executable file
View File

@@ -0,0 +1,11 @@
# task Name: File2
# Дано имя файла и целое число N (> 1). Создать файл целых чисел
# с даннымименемизаписать в него N первых положительных четных чисел (2, 4, …).
N = int(input())
with open("task_1.bin", "wb") as binfile:
i = 0
while i != N:
i += 2
binfile.write(i.to_bytes(4, byteorder="big"))