From 00419d8165f8a3fe37bdf03eaed68c6c2ce8dbb5 Mon Sep 17 00:00:00 2001 From: Katerina Date: Mon, 6 Oct 2025 02:09:32 +0300 Subject: [PATCH] task_commit --- TEMA4/task.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 TEMA4/task.py diff --git a/TEMA4/task.py b/TEMA4/task.py new file mode 100644 index 0000000..db97096 --- /dev/null +++ b/TEMA4/task.py @@ -0,0 +1,20 @@ +import math +import cmath +import time +import random +import string +import statistics +print(math.floor((round(cmath.phase(0.2+0.8j), 2) * 20) / 3), (round(cmath.phase(0.2+0.8j), 2) * 20) % 3) +msc_time = time.localtime(time.time() + 3 * 3600); print(msc_time) +mytime = f"{msc_time.tm_hour:02d}:{msc_time.tm_min:02d}"; print(mytime) +wd = ['Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота', 'Воскресенье'] +p = random.sample(wd, 3); print(p) +k = list(range(14, 33, 3)); print(k) + rand = random.choice(k); print(rand) +N = round(random.gauss(15, 4)) +N=max(1,N); print(N) +rl = random.choices(string.ascii_uppercase, k=N); print(rl) +['J', 'Y', 'Z', 'Z', 'I', 'W', 'F', 'Y', 'B', 'H', 'G', 'N', 'B', 'F', 'B', 'D', 'P', 'Y', 'R', 'I', 'R', 'C'] +c = time.time();print(c) +inter_sec = c - time.mktime(msc_time); print(inter_sec) +inter_min = round(inter_sec / 60, 2); print(inter_min)