All problems
Growth Percentile
Problem
Return the percentile of a normally distributed score: 100 * Phi((score - mean)/sd). Return 0.0 when sd <= 0.
Hint
Use the normal CDF through math.erf.
Test cases
case 1
in: [100,100,15]
expected: 50
case 2
in: [115,100,15]
expected: 84.1344746068543
case 3
in: [85,100,15]
expected: 15.865525393145708
case 4
in: [130,100,15]
expected: 97.72498680518208
case 5
in: [100,100,0]
expected: 0
Starter codePython
import math
def growth_percentile(score, mean, sd):
# Your code here
pass5 test cases · run your code against them in the editor