Loading…
Python has useful built-in functions:
| Function | Description |
|---|---|
| sum(list) | Total of all values |
| min(list) | Smallest value |
| max(list) | Largest value |
| len(list) | Number of items |
mean = sum(data) / len(data)
Given temps = [72, 68, 75, 80, 65, 78, 82], print:
Output format:
Min: 65
Max: 82
Avg: 74.3
Downloading Python… (one-time, ~10 MB)
This runs entirely in your browser and is cached for next time.