fix: apply bounty solution for src/calculate_average.py

This commit is contained in:
tomassdamian 2026-05-18 23:53:59 -03:00
parent 7fd1a60b01
commit 1c9c9b38fb

5
src/calculate_average.py Normal file
View File

@ -0,0 +1,5 @@
def calculate_average(values: list[float]) -> float:
"""Return the arithmetic mean of values, or 0 if the list is empty."""
if not values:
return 0
return sum(values) / len(values)