This commit is contained in:
tomassdamian 2026-05-18 23:54:01 -03:00 committed by GitHub
commit 592cbeec15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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)