feat(nadia): Implement multiply and divide in calculator.py

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
This commit is contained in:
typosaurus 2026-07-25 17:08:02 +02:00
parent 380ac7f40f
commit 3f2a5c8a07
2 changed files with 10 additions and 0 deletions

Binary file not shown.

View File

@ -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