Cody

Solution 1284103

Submitted on 10 Oct 2017 by Daniel Pereira
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
x = 6; y = 3; p_correct = 2/3; assert(isequal(survival(x,y),p_correct))

2   Pass
x = 15; y = 5; p_correct = 3/5; assert(isequal(survival(x,y),p_correct))

3   Pass
x = 30; y = 6; p_correct = 35/60; assert(isequal(survival(x,y),p_correct))

4   Pass
x = 4; y = 4; p_correct = 5/8; assert(isequal(survival(x,y),p_correct))

Suggested Problems