Skip to content
DeepForgeby svx
All problems
EasyStatisticsst-145

Deviation IQ

Problem

Return the deviation IQ 100 + 15*(raw - mean)/sd, a standard score with mean 100 and standard deviation 15. Return 0.0 when sd <= 0.

Hint

It is the z-score linearly rescaled.

Test cases

case 1
in: [115,100,15]
expected: 115
case 2
in: [85,100,15]
expected: 85
case 3
in: [100,100,15]
expected: 100
case 4
in: [60,50,10]
expected: 115
case 5
in: [10,100,0]
expected: 0
Starter codePython
def deviation_iq(raw, mean, sd):
    # Your code here
    pass

5 test cases · run your code against them in the editor