Cody

Problem 44861. Ratio between sums of prime and non-prime numbers

Solution 3901128

Submitted on 29 Nov 2020
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 = 7; y_correct = 17/11; assert(isequal(your_fcn_name(x),y_correct))

2   Fail
x = 8; y_correct = 17/11; assert(isequal(your_fcn_name(x),y_correct))

Assertion failed.

3   Fail
x = 9; y_correct = 17/11; assert(isequal(your_fcn_name(x),y_correct))

Assertion failed.

4   Fail
x = 12; y_correct = 28/38; assert(isequal(your_fcn_name(x),y_correct))

Assertion failed.

5   Fail
x = 20; y_correct = 77/113; assert(isequal(your_fcn_name(x),y_correct))

Assertion failed.

6   Pass
x = 31; y_correct = 160/336; assert(isequal(your_fcn_name(x),y_correct))

7   Fail
x = 32; y_correct = 160/336; assert(isequal(your_fcn_name(x),y_correct))

Assertion failed.

8   Fail
x = 42; y_correct = 238/623; assert(isequal(your_fcn_name(x),y_correct))

Assertion failed.

Suggested Problems

More from this Author11

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!