Cody

Solution 1770040

Submitted on 2 Apr 2019 by Abdelfatah Teamah
  • Size: 9
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
playera=1613; elos=[1609 1477 1388 1586 1720]; res=[0 0.5 1 1 0]; assert(isequal(new_elo(elos,res,playera),1601))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In new_elo (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)]

2   Pass
playera=1613; elos=[1609 1477 1586 1720]; res=[0 1 1 1]; assert(isequal(new_elo(elos,res,playera),1642))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In new_elo (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)]

3   Pass
playera=1613; elos=[1613 1613 1613 1613 1613]; res=[0.5 0.5 0.5 0.5 0.5]; assert(isequal(new_elo(elos,res,playera),1613))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In new_elo (line 2) In ScoringEngineTestPoint3 (line 4) In solutionTest (line 7)]

4   Pass
assert(isequal(new_elo([1800 1900 2000 2100 2200],[1 0 1 0 1],1900),1935))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In new_elo (line 2) In ScoringEngineTestPoint4 (line 1) In solutionTest (line 9)]

5   Pass
playera=1800; elos=[1399 1280 2166 1534 1768 1791 1540]; res=[1 1 0 1 1 0 1]; assert(isequal(new_elo(elos,res,playera),1811))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In new_elo (line 2) In ScoringEngineTestPoint5 (line 4) In solutionTest (line 11)]

6   Pass
playera=1800; elos=[1399 1280 2166 1534 1768 1791 1540]; res=[1 1 0 1 1 0 0]; assert(isequal(new_elo(elos,res,playera),1779))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In new_elo (line 2) In ScoringEngineTestPoint6 (line 4) In solutionTest (line 13)]

7   Pass
playera=1800; elos=[1399 1280 2166 1534 1768 1791 1540]; res=[1 1 1 1 1 1 1]; assert(isequal(new_elo(elos,res,playera),1875))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In new_elo (line 2) In ScoringEngineTestPoint7 (line 4) In solutionTest (line 15)]

8   Pass
caruana=2801; elos = [2772 2768 2877 2805 2787 2772 2768 2877 2787 2805]; res = [1 1 1 1 1 1 1 0.5 0.5 0.5]; assert(isequal(new_elo(elos,res,caruana),2913))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In new_elo (line 2) In ScoringEngineTestPoint8 (line 4) In solutionTest (line 17)]

Suggested Problems