Cody

Solution 1753208

Submitted on 17 Mar 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
x = 1; y_correct = false; assert(isequal(your_fcn_name(x),y_correct))

Error in solution Line: 2 Column: 7 Illegal use of reserved keyword "if".

2   Fail
x = 2; y_correct = true; assert(isequal(your_fcn_name(x),y_correct))

Error in solution Line: 2 Column: 7 Illegal use of reserved keyword "if".

3   Fail
x = 11; y_correct = false; assert(isequal(your_fcn_name(x),y_correct))

Error in solution Line: 2 Column: 7 Illegal use of reserved keyword "if".

4   Fail
x = 22; y_correct = true; assert(isequal(your_fcn_name(x),y_correct))

Error in solution Line: 2 Column: 7 Illegal use of reserved keyword "if".

5   Fail
x = 13; y_correct = false; assert(isequal(your_fcn_name(x),y_correct))

Error in solution Line: 2 Column: 7 Illegal use of reserved keyword "if".

6   Fail
x = [56 117 8 24 44 33 15]; y_correct = [true false true true true false false]; assert(isequal(your_fcn_name(x),y_correct))

Error in solution Line: 2 Column: 7 Illegal use of reserved keyword "if".

7   Fail
x = [99 558 100; 101 6 4; 44 31 39]; y_correct = [false true true; false true true; true false false]; assert(isequal(your_fcn_name(x),y_correct))

Error in solution Line: 2 Column: 7 Illegal use of reserved keyword "if".

8   Fail
filetext = fileread('your_fcn_name.m'); assert(isempty(strfind(filetext, 'for')),'for command is forbidden') assert(isempty(strfind(filetext, 'repelem')),'repelem command is forbidden') assert(isempty(strfind(filetext, 'discretize')),'discretize command is forbidden') assert(isempty(strfind(filetext, 'while')),'while command is forbidden') assert(isempty(strfind(filetext, 'if')),'if command is forbidden')

Error in solution Line: 2 Column: 7 Illegal use of reserved keyword "if".