Cody

Problem 1260. RISK board game battle simulation

Solution 1902529

Submitted on 16 Aug 2019
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   Fail
a = 3; d = 0; y_correct = 1.000; assert(abs(risk_prob(a, d) - y_correct) <= 0.01)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test1 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.01)

2   Fail
a = 1; d = 5; y_correct = 0.000; assert(abs(risk_prob(a, d) - y_correct) <= 0.01)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test2 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.01)

3   Fail
a = 5; d = 3; y_correct = 0.642; assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test3 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

4   Fail
a = 4; d = 6; y_correct = 0.134; assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test4 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

5   Fail
a = 10; d = 10; y_correct = 0.480; assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test5 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

6   Fail
a = 7; d = 8; y_correct = 0.329; assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test6 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

7   Fail
a = 8; d = 7; y_correct = 0.5355; assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test7 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

8   Fail
a = 20; d = 10; y_correct = 0.965; assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test8 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

9   Fail
a = 4; d = 2; y_correct = 0.656; assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test9 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

10   Fail
a = 6; d = 4; y_correct = 0.638; assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test10 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

11   Fail
a = 2; d = 1; y_correct = 0.417; assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test11 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

12   Fail
a = 2; d = 2; y_correct = 0.104; assert(abs(risk_prob(a, d) - y_correct) <= 0.02)

Output argument "y" (and maybe others) not assigned during call to "risk_prob". Error in Test12 (line 4) assert(abs(risk_prob(a, d) - y_correct) <= 0.02)