Skip to content
DeepForgeby svx
All problems
EasyStatisticsst-247

Elo Expected Score

Problem

Return the Elo expected score of player A against player B: 1 / (1 + 10^((rb - ra) / 400)). The result is between 0 and 1 and equals 0.5 for equal ratings.

Test cases

case 1
in: [1500,1500]
expected: 0.5
case 2
in: [1600,1400]
expected: 0.7597469266479578
case 3
in: [1400,1600]
expected: 0.2402530733520421
Starter codePython
def elo_expected(ra, rb):
    # Your code here
    pass

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