Average of Top Three
Return the average of the three highest values in scores (repeats count separately), as a float. scores always has at least 3 values.
Example 1
scores [5,1,9,7,2]
returns 7.0
The top three are 9, 7 and 5, which average 7.0.
Constraints
3 <= len(scores) <= 100
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More NumPy problems
- Biggest JumpEasy
- Brighten ImageEasy
- Bucket CountsEasy
- Busiest ColumnEasy
- Change Between RowsEasy
- Close EnoughEasy
- Closest to OriginEasy
- Closest to TargetEasy