Cody

Solution 2027678

Submitted on 19 Nov 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; n_correct = 'odd'; assert(isequal(oddornot(x),n_correct))

Assertion failed.

2   Fail
x = 12; n_correct = 'even'; assert(isequal(oddornot(x),n_correct))

Assertion failed.

3   Pass
x = 467.3; n_correct = 'error'; assert(isequal(oddornot(x),n_correct))

4   Fail
x = -911; n_correct = 'odd'; assert(isequal(oddornot(x),n_correct))

Assertion failed.

5   Fail
x = 8230749726348; n_correct = 'even'; assert(isequal(oddornot(x),n_correct))

Assertion failed.

6   Pass
x = pi; n_correct = 'error'; assert(isequal(oddornot(x),n_correct))

7   Pass
x = 'a'; n_correct = 'error'; assert(isequal(oddornot(x),n_correct))

8   Pass
x = 'donald'; n_correct = 'error'; assert(isequal(oddornot(x),n_correct))