From c2f69a6124b786ab2a99219db614ef095f4b3d75 Mon Sep 17 00:00:00 2001 From: Stepan Date: Wed, 6 May 2026 15:12:55 +0300 Subject: [PATCH] trash --- data.json | 0 l1.py | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 data.json create mode 100644 l1.py diff --git a/data.json b/data.json new file mode 100644 index 0000000..e69de29 diff --git a/l1.py b/l1.py new file mode 100644 index 0000000..a624c41 --- /dev/null +++ b/l1.py @@ -0,0 +1,43 @@ +import sys + +pol = input('Начнем(да/нет) ') +sp = [] + +def poll(): + pol1 = float(input('Температура: ')) + pol2 = input('Единица (C/F): ') + if pol2=='C': + x = pol1*1.8+32 + xx = f'{pol1}C = {x}' + sp.append(xx) + print(f'{pol1}C = {x}') + elif pol2=='F': + f = (pol1 - 32)/1.8 + ff = f'{pol1}F = {f}' + sp.append(ff) + print(ff) + else: + print('Введите верную букву') + +def his(): + print(sp) + +def circle(): + while True: + if pol=='да': + poll() + print('1. Продолжить\n2. Закончить\n3. История') + po = input('Число ') + if po=='1': + continue + elif po=='2': + sys.exit(1) + elif po=='3': + his() + else: + print('Не то число') + elif pol=='нет': + sys.exit(1) + else: + print('нет') +circle()