10 XP challenge
Average a Basket of Scores
easy
Build it yourself · 6 min
1 Learn2 Predict3 Solve
TaskYour mission
Return the integer average of numbers, rounded down. Return 0 for an empty list. numbers contains 0 to 30 scores from 0 to 100.
Examples
| Input | Return |
|---|---|
numbers = [2,4,6]total: 0 → 2 → 6 → 12. The result is 4. | 4 |
numbers = [1,2]total: 0 → 1 → 3. The result is 1. | 1 |
Your code
Write your answer inside Solution, then use return to send it back.
Ln 1, Col 1
JavaScript
Try examples runs the public examples. Check my code checks your full answer and saves your completion.