Problem 190480 · easy · Phase 01 Prerequisites & Setup

Average Score

lists · statistics · rounding

Write average_score(scores) that returns the arithmetic mean of the scores rounded to 2 decimal places. Return 0.0 for an empty list.

Examples

Input:  scores = [80, 90, 85]
Output: 85.0

Input:  scores = [1, 2]
Output: 1.5

Constraints

  • 0 <= len(scores) <= 5000

Goals

  • Compute a mean with a loop and a count
  • Round to two decimals and handle an empty list
Starting Python…