Does it work if n=3 or greater??
Pretty confusing!!
Ofcourse not, the problem with cody is that you can see the unit test.
But the good thing about Cody is that you can update the test suite. Thanks for the comments, and please keep flagging bad tests so we can fix them.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 1;
ans_correct = true;
assert(isequal(is_it_odd(n),ans_correct))
|
2 | Pass |
%%
n = 2;
ans_correct = false;
assert(isequal(is_it_odd(n),ans_correct))
|
3 | Fail |
%%
n = 28;
ans_correct = false;
assert(isequal(is_it_odd(n),ans_correct))
Error: Assertion failed.
|
4 | Fail |
%%
n = 453;
ans_correct = true;
assert(isequal(is_it_odd(n),ans_correct))
Error: Assertion failed.
|
5 | Fail |
%%
n = 17;
ans_correct = true;
assert(isequal(is_it_odd(n),ans_correct))
Error: Assertion failed.
|
6 | Fail |
%%
n = 16;
ans_correct = false;
assert(isequal(is_it_odd(n),ans_correct))
Error: Assertion failed.
|
733 Solvers
261 Solvers
273 Solvers
307 Solvers
String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
358 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!