This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
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))
|
Make the vector [1 2 3 4 5 6 7 8 9 10]
35547 Solvers
19329 Solvers
Numbers with prime factors 2, 3 and 5.
166 Solvers
Number of 1s in a binary string
2818 Solvers
204 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!