Count and total · Easy

Class average

A teacher lists each student and their score out of 100. Some students were absent.

Task

Write a prompt that works out the class average.

Output format

<average with 1 decimal>

  • Leave out students marked ABSENT (they do not count as 0).
  • If nobody has a score, return NO SCORES.

Your prompt must contain {input}: it is replaced by each test case, just like the hidden tests in a hiring test.

Sample case 1
Input
Ali: 80
Ben: 90
Maya: 70
Output
80.0
Sample case 2
Input
Ali: 80
Ben: ABSENT
Maya: 61
Output
70.5

There are 5 test cases in all; the others are like hidden tests: work out what tricky inputs they might use!

Loading the editor…