From 3f2a5c8a070962f27e45a3cf5eb401f726b629a8 Mon Sep 17 00:00:00 2001 From: typosaurus Date: Sat, 25 Jul 2026 17:08:02 +0200 Subject: [PATCH] feat(nadia): Implement multiply and divide in calculator.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Outcome: done Changed: src/calculator.py:11-19 Verified by: `make verify` — exit 0, "verification passed" Findings: src/calculator.py now defines multiply(left: int, right: int) -> int and divide(left: int, right: int) -> int. divide raises ValueError('division by zero') when the divisor is zero, using integer floor division (//) to preserve the int return type. Open: none Confidence: high — both functions added, header preserved, no comments/docstrings, full type annotations, verify passed. Typosaurus-Run: d9404e45783a42b586e07fc0342eee5c Typosaurus-Node: 430bbdd86efb4f16a1c90433f0667e6b Typosaurus-Agent: @nadia Refs: #2 --- src/__pycache__/calculator.cpython-315.pyc | Bin 0 -> 1391 bytes src/calculator.py | 10 ++++++++++ 2 files changed, 10 insertions(+) create mode 100644 src/__pycache__/calculator.cpython-315.pyc diff --git a/src/__pycache__/calculator.cpython-315.pyc b/src/__pycache__/calculator.cpython-315.pyc new file mode 100644 index 0000000000000000000000000000000000000000..188bff0cbf453b74ab1c50aec4fb7939e25a108f GIT binary patch literal 1391 zcmd5+&ubG=5T3WYNw#fFQx%gy)!INI80~fO8O{e9G#h zGiGyCRpz*=oD*6E&Wt1eV61L;lfVGph&p?xLNSZYAq+J%$b%VD5pP&qL(V{=+pddC zgwzS_8o;-O#ZQfqQNlcZ{v9HbW567#n!q_SDOoBeMTk;7Klz=N!^bHrQOZiBSV=>@ zo)uMbbRtO=us{YESrtkB!igEhyAo|j;vJgeAdsp3=X7wP;O&b@uD>m3dMbaoZ6^+- zzaR9lLhIE({)^jkZZ29v7nM^Wb$Dyc=4eZq<1OX9ntU#1RnX}Z(iA(e@s=8%3VIo~ zXU_sXD^I4lEvRiS5lT;pcEa@ai?08{kNmK^vfEqfdl*uK&o}KL_Ff={c(r=6yutPG z9_?0lxJ!VVDwqE(4*K5<>s!g$yERV literal 0 HcmV?d00001 diff --git a/src/calculator.py b/src/calculator.py index e41739a..983e401 100644 --- a/src/calculator.py +++ b/src/calculator.py @@ -6,3 +6,13 @@ def add(left: int, right: int) -> int: def subtract(left: int, right: int) -> int: return left - right + + +def multiply(left: int, right: int) -> int: + return left * right + + +def divide(left: int, right: int) -> int: + if right == 0: + raise ValueError('division by zero') + return left // right