Skip to content

Commit 6e06c09

Browse files
Add harmonic mean reference
1 parent c22f999 commit 6e06c09

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

maths/harmonic_mean.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ def harmonic_mean(numbers: list[int | float]) -> float:
55
"""
66
Return the harmonic mean of a sequence of numbers.
77
8+
Reference: https://en.wikipedia.org/wiki/Harmonic_mean
9+
810
>>> harmonic_mean([1, 2, 4])
911
1.7142857142857142
1012
>>> harmonic_mean([2, 2, 2])

0 commit comments

Comments
 (0)