Run ❯
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
# Import statistics Library import statistics # Calculate the median of grouped continuous data print(statistics.median_grouped([1, 2, 3, 4])) print(statistics.median_grouped([1, 2, 3, 4, 5])) print(statistics.median_grouped([1, 2, 3, 4], 2)) print(statistics.median_grouped([1, 2, 3, 4], 3)) print(statistics.median_grouped([1, 2, 3, 4], 5))
2.5
3.0
2.0
1.5
0.5