From c03e86862c3ef0c6863a66ef2b83022c789dedeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BE=D0=B9=D1=82=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Tue, 5 May 2026 13:03:16 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20comparison.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comparison.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 comparison.py diff --git a/comparison.py b/comparison.py new file mode 100644 index 0000000..43a35f6 --- /dev/null +++ b/comparison.py @@ -0,0 +1,11 @@ +def compare(expression: srt) -> bool: + if '>' in expression: + parts = expression.split(">") + a = int(parts[0]) + b = int(parts[1]) + return a>b + else: + parts = expression.split("<") + a=int(parts[0]) + b=int(parts[1]) + return a