feat: Add an average function to the calculator #12

Merged
typosaurus merged 2 commits from typosaurus/11-add-an-average-function-to-the-calculator into main 2026-07-26 22:13:17 +02:00
Owner

What was built

Add an average(values) function to src/calculator.py returning the arithmetic mean, raising ValueError on an empty sequence. Follow the conventions in CLAUDE.md.

Acceptance criteria

  • The ticket objective is satisfied: Add an average function to the calculator

Commits

Commit Summary Node
c5999afcadcf test(sveta): Write tests for average function cc947cb8b24b
3ad3dc517fa1 feat(nadia): Implement average function in src/calculator.py 7a52f9800aff

Run

Cost: 0.0023 USD · Nodes: 6 · Verification: make verify

Closes #11

## What was built Add an `average(values)` function to src/calculator.py returning the arithmetic mean, raising ValueError on an empty sequence. Follow the conventions in CLAUDE.md. ## Acceptance criteria - The ticket objective is satisfied: Add an average function to the calculator ## Commits | Commit | Summary | Node | |---|---|---| | `c5999afcadcf` | test(sveta): Write tests for average function | `cc947cb8b24b` | | `3ad3dc517fa1` | feat(nadia): Implement average function in src/calculator.py | `7a52f9800aff` | ## Run Cost: 0.0023 USD · Nodes: 6 · Verification: make verify Closes #11
typosaurus added 2 commits 2026-07-26 16:52:01 +02:00
Outcome: done
Changed: src/calculator.py:29-32
Verified by: `make verify` passed (16 tests, OK); `python3 -m compileall -q src/calculator.py` passed; manual assertion of all acceptance criteria passed
Findings: average(values: list[int | float]) -> float was added to src/calculator.py:29-32
Open: none
Confidence: high - all acceptance criteria met, header present, type annotations present, no comments/docstrings, compile passes, tests pass, manual verification confirms every criterion

Typosaurus-Run: 32dcefafeb39422b82cbd65f56833df7
Typosaurus-Node: 7a52f9800aff4d4396b35d10ada3aacf
Typosaurus-Agent: @nadia
Refs: #11
Outcome: done
Changed: tests/test_calculator.py:1 (import line), tests/test_calculator.py:88-107 (new class)
Verified by: `make verify` passed (22 tests, OK); `python3 -m compileall -q tests/test_calculator.py` passed (no warnings)
Findings: TestAverageFunction class with 6 test methods added to tests/test_calculator.py:88-107 covering empty, single-element, positive, negative, mixed, and float input cases.
Open: none
Confidence: high - all 6 acceptance criteria tests exist, all pass, no comments/docstrings, conventions followed

Typosaurus-Run: 32dcefafeb39422b82cbd65f56833df7
Typosaurus-Node: cc947cb8b24b47139b0a1b6e10d6384a
Typosaurus-Agent: @sveta
Refs: #11
typosaurus force-pushed typosaurus/11-add-an-average-function-to-the-calculator from 5ce9dbb2a3 to c5999afcad 2026-07-26 22:12:53 +02:00 Compare
typosaurus merged commit 4940dfeffd into main 2026-07-26 22:13:17 +02:00
typosaurus deleted branch typosaurus/11-add-an-average-function-to-the-calculator 2026-07-26 22:13:24 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: typosaurus/typosaurus-sandbox#12
No description provided.