Cody

Solution 1846124

Submitted on 11 Jun 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
lowVal = 10; highVal = 50; p = [11 13 17 19 29 31 41 43]; assert(isequal(window_twins(lowVal,highVal),p))

Cannot find an exact (case-sensitive) match for 'isPrime' The closest match is: isprime in /opt/mlsedu/matlab/R2019a/toolbox/matlab/specfun/isprime.m Error in window_twins (line 4) if isPrime(n) & isPrime(n+2) Error in Test1 (line 7) assert(isequal(window_twins(lowVal,highVal),p))

2   Fail
lowVal = 1000; highVal = 1050; p = [1019 1021 1031 1033]; assert(isequal(window_twins(lowVal,highVal),p))

Cannot find an exact (case-sensitive) match for 'isPrime' The closest match is: isprime in /opt/mlsedu/matlab/R2019a/toolbox/matlab/specfun/isprime.m Error in window_twins (line 4) if isPrime(n) & isPrime(n+2) Error in Test2 (line 5) assert(isequal(window_twins(lowVal,highVal),p))

3   Fail
lowVal = 3120; highVal = 3300; p = [ 3167 3169 3251 3253 3257 3259]; assert(isequal(window_twins(lowVal,highVal),p))

Cannot find an exact (case-sensitive) match for 'isPrime' The closest match is: isprime in /opt/mlsedu/matlab/R2019a/toolbox/matlab/specfun/isprime.m Error in window_twins (line 4) if isPrime(n) & isPrime(n+2) Error in Test3 (line 6) assert(isequal(window_twins(lowVal,highVal),p))