Cody

Solution 2463854

Submitted on 3 Jun 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   Fail
a = 1; y_correct = 2; assert(isequal(zero_and(a),y_correct))

Assertion failed.

2   Fail
a = 2; y_correct = 1; assert(isequal(zero_and(a),y_correct))

Assertion failed.

3   Fail
a = 12; y_correct = 1; assert(isequal(zero_and(a),y_correct))

Assertion failed.

4   Fail
a = 11; y_correct = 4; assert(isequal(zero_and(a),y_correct))

Assertion failed.

5   Fail
a = 15; y_correct = 16; assert(isequal(zero_and(a),y_correct))

Assertion failed.

6   Fail
a = 23; y_correct = 8; assert(isequal(zero_and(a),y_correct))

Assertion failed.

7   Fail
a = 93; y_correct = 2; assert(isequal(zero_and(a),y_correct))

Assertion failed.

8   Fail
a = 1455; y_correct = 16; assert(isequal(zero_and(a),y_correct))

Assertion failed.

9   Fail
a = 255; y_correct = 256; assert(isequal(zero_and(a),y_correct))

Assertion failed.

10   Fail
a = 435175; y_correct = 8; assert(isequal(zero_and(a),y_correct))

Assertion failed.

11   Pass
filetext = fileread('zero_and.m'); assert(isempty(strfind(filetext, 'regexp')),'regexp() forbidden') assert(isempty(strfind(filetext, 'varargin')),'varargin() forbidden')