List Statistics
Medium
Write a function that takes a list of numbers and returns a dictionary with:
- min: minimum value
- max: maximum value
- sum: total sum
- avg: average (rounded to 2 decimal places)
- count: number of elements
- min: minimum value
- max: maximum value
- sum: total sum
- avg: average (rounded to 2 decimal places)
- count: number of elements
Input
A list of numbers
Output
Dictionary with statistics
Example
Input
[4, 7, 2, 9, 1, 5]
Output
{"min": 1, "max": 9, "sum": 28, "avg": 4.67, "count": 6}
Python has built-in min(), max(), sum(), and len() functions.
⚡ 20 XP on solve
← Back to lesson
Your Solution
Output
Click "Run" to execute your code...
⏳ Loading Python runtime (first run may take a few seconds)...
Log in to submit your solution and earn XP.