Cody

Solution 1687371

Submitted on 6 Dec 2018 by test test
  • Size: 8
  • This is the leading solution.
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   Pass
assessFunctionAbsence({'regexp','regexpi','regexprep','str2num'},'FileName','mtimes.m')

[Warning: Function mtimes has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In matlab.internal.getCode (line 22) In mtree (line 78) In FileReadHelper/generateMtree In FileReadHelper/generateFileMetadata In FunctionAbsenceConstraint/getNotAbsentFunctions (line 50) In FunctionAbsenceConstraint/satisfiedBy (line 15) In assessFunctionAbsence (line 49) In ScoringEngineTestPoint1 (line 1) In solutionTest (line 3)]

2   Pass
assert(isequal("cody" * 5, "codycodycodycodycody"))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint2 (line 1) In solutionTest (line 5)] [Warning: Function mtimes has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint2 (line 1) In solutionTest (line 5)]

3   Pass
assert(isequal("cody" * 5, "cody" * 2 + "cody" * 3))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint3 (line 1) In solutionTest (line 7)] [Warning: Function mtimes has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint3 (line 1) In solutionTest (line 7)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint3 (line 1) In solutionTest (line 7)] [Warning: Function mtimes has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint3 (line 1) In solutionTest (line 7)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint3 (line 1) In solutionTest (line 7)] [Warning: Function mtimes has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint3 (line 1) In solutionTest (line 7)]

4   Pass
assert(isequal(" Cody is fun! Cody is fun! Cody is fun!", 3 * " Cody is fun!"))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint4 (line 1) In solutionTest (line 9)] [Warning: Function mtimes has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint4 (line 1) In solutionTest (line 9)]

5   Pass
assert(isequal(" Cody 5-Year Anniversary! Cody 5-Year Anniversary!", " Cody 5-Year Anniversary!" * 2))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint5 (line 1) In solutionTest (line 11)] [Warning: Function mtimes has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint5 (line 1) In solutionTest (line 11)]

6   Pass
x = ["Cody";"matlab";"Simulink";"@Mathworks"] + (5:5:randi([1000,5000])); assert(isequal(x*2,x+x)) assert(isequal(x*3,x+x+x)) assert(isequal(5*x,x+x+x+x+x)) assert(isequal(101*x,x+100*x))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint6 (line 2) In solutionTest (line 13)] [Warning: Function mtimes has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint6 (line 2) In solutionTest (line 13)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint6 (line 3) In solutionTest (line 13)] [Warning: Function mtimes has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint6 (line 3) In solutionTest (line 13)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint6 (line 4) In solutionTest (line 13)] [Warning: Function mtimes has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint6 (line 4) In solutionTest (line 13)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint6 (line 5) In solutionTest (line 13)] [Warning: Function mtimes has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint6 (line 5) In solutionTest (line 13)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In * (line 2) In ScoringEngineTestPoint6 (line 5) In solutionTest (line 13)]

Suggested Problems