This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
%%
% removes overloads addressing this specific testsuite
!/bin/rm assert* fopen* fclose* fread*
% gets expected output/score
fh=fopen('zeroscore.m');str=fread(fh,'*char')'; fclose(fh);
results=cody.verifyCode(str,'assert(isequal(zeroscore(),0))');
% pass/fail
str={'Failed','Passed'};
if results.pass&results.score=='0'&ischar(results.score), fprintf('Congrats! Solution score: %s; Correct output: %s\n',results.score, str{1+results.pass});
else fprintf('Sorry! Solution score: %s; Correct output: %s\n',results.score, str{1+results.pass}); [a,b]=1;
end
/bin/rm: cannot remove ‘assert*’: No such file or directory
/bin/rm: cannot remove ‘fopen*’: No such file or directory
/bin/rm: cannot remove ‘fclose*’: No such file or directory
/bin/rm: cannot remove ‘fread*’: No such file or directory
[Warning: Function horzcat has the same name as a MATLAB builtin. We suggest you rename the function
to avoid a potential name conflict.]
|
Increment a number, given its digits
562 Solvers
Back to basics 6 - Column Vector
908 Solvers
Back to basics 13 - Input variables
233 Solvers
260 Solvers
218 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!