Cody

Solution 1687587

Submitted on 6 Dec 2018 by Martin C.
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
r1 = 2; b1 = 7; r2 = 5; b2 = 5; prob_correct = 0.2500; assert(isequal(probRedBall(r1,b1,r2,b2),prob_correct))

prob = 0.2500

2   Pass
r1 = 0; b1 = 5; r2 = 0; b2 = 5; prob_correct = 0.0000; assert(isequal(probRedBall(r1,b1,r2,b2),prob_correct))

prob = 0

3   Pass
r1 = 0; b1 = 3; r2 = 1; b2 = 3; prob_correct = 0.0625; assert(isequal(probRedBall(r1,b1,r2,b2),prob_correct))

prob = 0.0625

Suggested Problems