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:
parent
380ac7f40f
commit
3f2a5c8a07
BIN
src/__pycache__/calculator.cpython-315.pyc
Normal file
BIN
src/__pycache__/calculator.cpython-315.pyc
Normal file
Binary file not shown.
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user