How Unusual Is This Score?
A parent at Whetcode Academy has emailed about their child's test result and asked whether it is genuinely exceptional or merely a bit above average. The head of year cannot answer with the raw mark alone: 90 means one thing in a class where everyone finishes within two marks of each other and something else entirely in a class spread all over the paper. She wants any mark restated on a scale that carries its own class's spread with it, because the same email arrives about a different child in a different class most weeks.
Treat the marks supplied for a class as the entire group being described, not a sample standing in for a wider cohort, so both the average and the spread are population figures.
Task: Print the z-score of the queried mark - how many standard deviations above the class average it sits - rounded to 2 decimals. A mark below the average gives a negative answer.
Input
The first line holds that class's marks, separated by single spaces; each is a whole number. The second line holds the single mark the parent asked about, which is one of the marks on the first line.
Output
One line holding the z-score, rounded to 2 decimals and printed the way Python prints a float - 1.41, and -1.06 when the mark sits below average.
Example:
Input:
50 60 70 80 90
90
Output:
1.41
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in