Cody

Solution 1445072

Submitted on 20 Feb 2018 by Michal Belorit
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')

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

a1 = "cody" b1 = 5 y = 1×5 string array "cody" "cody" "cody" "cody" "cody" y = "codycodycodycodycody"

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

a1 = "cody" b1 = 5 y = 1×5 string array "cody" "cody" "cody" "cody" "cody" y = "codycodycodycodycody" a1 = "cody" b1 = 2 y = 1×2 string array "cody" "cody" y = "codycody" a1 = "cody" b1 = 3 y = 1×3 string array "cody" "cody" "cody" y = "codycodycody"

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

a1 = " Cody is fun!" b1 = 3 y = 1×3 string array " Cody is fun!" " Cody is fun!" " Cody is fun!" y = " Cody is fun! Cody is fun! Cody is fun!"

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

a1 = " Cody 5-Year Anniversary!" b1 = 2 y = 1×2 string array " Cody 5-Year Anniversary!" " Cody 5-Year Anniversary!" y = " Cody 5-Year Anniversary! Cody 5-Year Anniversary!"

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))

a1 = 4×777 string array Columns 1 through 10 "Cody5" "Cody10" "Cody15" "Cody20" "Cody25" "Cody30" "Cody35" "Cody40" "Cody45" "Cody50" "matlab5" "matlab10" "matlab15" "matlab20" "matlab25" "matlab30" "matlab35" "matlab40" "matlab45" "matlab50" "Simulink5" "Simulink10" "Simulink15" "Simulink20" "Simulink25" "Simulink30" "Simulink35" "Simulink40" "Simulink45" "Simulink50" "@Mathworks5" "@Mathworks10" "@Mathworks15" "@Mathworks20" "@Mathworks25" "@Mathworks30" "@Mathworks35" "@Mathworks40" "@Mathworks45" "@Mathworks50" Columns 11 through 19 "Cody55" "Cody60" "Cody65" "Cody70" "Cody75" "Cody80" "Cody85" "Cody90" "Cody95" "matlab55" "matlab60" "matlab65" "matlab70" "matlab75" "matlab80" "matlab85" "matlab90" "matlab95" "Simulink55" "Simulink60" "Simulink65" "Simulink70" "Simulink75" "Simulink80" "Simulink85" "Simulink90" "Simulink95" "@Mathworks55" "@Mathworks60" "@Mathworks65" "@Mathworks70" "@Mathworks75" "@Mathworks80" "@Mathworks85" "@Mathworks90" "@Mathworks95" Columns 20 through 28 "Cody100" "Cody105" "Cody110" "Cody115" "Cody120" "Cody125" "Cody130" "Cody135" "Cody140" "matlab100" "matlab105" "matlab110" "matlab115" "matlab120" "matlab125" "matlab130" "matlab135" "matlab140" "Simulink100" "Simulink105" "Simulink110" "Simulink115" "Simulink120" "Simulink125" "Simulink130" "Simulink135" "Simulink140" "@Mathworks100" "@Mathworks105" "@Mathworks110" "@Mathworks115" "@Mathworks120" "@Mathworks125" "@Mathworks130" "@Mathworks135" "@Mathworks140" Columns 29 through 37 "Cody145" "Cody150" "Cody155" "Cody160" "Cody165" "Cody170" "Cody175" "Cody180" "Cody185" "matlab145" "matlab150" "matlab155" "matlab160" "matlab165" "matlab170" "matlab175" "matlab180" "matlab185" "Simulink145" "Simulink150" "Simulink155" "Simulink160" "Simulink165" "Simulink170" "Simulink175" "Simulink180" "Simulink185" "@Mathworks145" "@Mathworks150" "@Mathworks155" "@Mathworks160" "@Mathworks165" "@Mathworks170" "@Mathworks175" "@Mathworks180" "@Mathworks185" Columns 38 through 46 "Cody190" "Cody195" "Cody200" "Cody205" "Cody210" "Cody215" "Cody220" "Cody225" "Cody230" "matlab190" "matlab195" "matlab200" "matlab205" "matlab210" "matlab215" "matlab220" "matlab225" "matlab230" "Simulink190" "Simulink195" "Simulink200" "Simulink205" "Simulink210" "Simulink215" "Simulink220" "Simulink225" "Simulink230" "@Mathworks190" "@Mathworks195" "@Mathworks200" "@Mathworks205" "@Mathworks210" "@Mathworks215" "@Mathworks220" "@Mathworks225" "@Mathworks230" Columns 47 through 55 "Cody235" "Cody240" "Cody245" "Cody250" "Cody255" "Cody260" "Cody265" "Cody270" "Cody275" "matlab235" "matlab240" "matlab245" "matlab250" "matlab255" "matlab260" "matlab265" "matlab270" "matlab275" "Simulink235" "Simulink240" "Simulink245" "Simulink250" "Simulink255" "Simulink260" "Simulink265" "Simulink270" "Simulink275" "@Mathworks235" "@Mathworks240" "@Mathworks245" "@Mathworks250" "@Mathworks255" "@Mathworks260" "@Mathworks265" "@Mathworks270" "@Mathworks275" Columns 56 through 64 "Cody280" "Cody285" "Cody290" "Cody295" "Cody300" "Cody305" "Cody310" "Cody315" "Cody320" "matlab280" "matlab285" "matlab290" "matlab295" "matlab300" "matlab305" "matlab310" "matlab315" "matlab320" "Simulink280" "Simulink285" "Simulink290" "Simulink295" "Simulink300" "Simulink305" "Simulink310" "Simulink315" "Simulink320" "@Mathworks280" "@Mathworks285" "@Mathworks290" "@Mathworks295" "@Mathworks300" "@Mathworks305" "@Mathworks310" "@Mathworks315" "@Mathworks320" Columns 65 through 73 "Cody325" "Cody330" "Cody335" "Cody340" "Cody345" "Cody350" "Cody355" "Cody360" "Cody365" "matlab325" "matlab330" "matlab335" "matlab340" "matlab345" "matlab350" "matlab355" "matlab360" "matlab365" "Simulink325" "Simulink330" "Simulink335" "Simulink340" "Simulink345" "Simulink350" "Simulink355" "Simulink360" "Simulink365" "@Mathworks325" "@Mathworks330" "@Mathworks335" "@Mathworks340" "@Mathworks345" "@Mathworks350" "@Mathworks355" "@Mathworks360" "@Mathworks365" Columns 74 through 82 "Cody370" "Cody375" "Cody380" "Cody385" "Cody390" "Cody395" "Cody400" "Cody405" "Cody410" "matlab370" "matlab375" "matlab380" "matlab385" "matlab390" "matlab395" "matlab400" "matlab405" "matlab410" "Simulink370" "Simulink375" "Simulink380" "Simulink385" "Simulink390" "Simulink395" "Simulink400" "Simulink405" "Simulink410" "@Mathworks370" "@Mathworks375" "@Mathworks380" "@Mathworks385" "@Mathworks390" "@Mathworks395" "@Mathworks400" "@Mathworks405" "@Mathworks410" Columns 83 through 91 "Cody415" "Cody420" "Cody425" "Cody430" "Cody435" "Cody440" "Cody445" "Cody450" "Cody455" "matlab415" "matlab420" "matlab425" "matlab430" "matlab435" "matlab440" "matlab445" "matlab450" "matlab455" "Simulink415" "Simulink420" "Simulink425" "Simulink430" "Simulink435" "Simulink440" "Simulink445" "Simulink450" "Simulink455" "@Mathworks415" "@Mathworks420" "@Mathworks425" "@Mathworks430" "@Mathworks435" "@Mathworks440" "@Mathworks445" "@Mathworks450" "@Mathworks455" Columns 92 through 100 "Cody460" "Cody465" "Cody470" "Cody475" "Cody480" "Cody485" "Cody490" "Cody495" "Cody500" "matlab460" "matlab465" "matlab470" "matlab475" "matlab480" "matlab485" "matlab490" "matlab495" "matlab500" "Simulink460" "Simulink465" "Simulink470" "Simulink475" "Simulink480" "Simulink485" "Simulink490" "Simulink495" "Simulink500" "@Mathworks460" "@Mathworks465" "@Mathworks470" "@Mathworks475" "@Mathworks480" "@Mathworks485" "@Mathworks490" "@Mathworks495" "@Mathworks500" Columns 101 through 109 "Cody505" "Cody510" "Cody515" "Cody520" "Cody525" "Cody530" "Cody535" "Cody540" "Cody545" "matlab505" "matlab510" "matlab515" "matlab520" "matlab525" "matlab530" "matlab535" "matlab540" "matlab545" "Simulink505" "Simulink510" "Simulink515" "Simulink520" "Simulink525" "Simulink530" "Simulink535" "Simulink540" "Simulink545" "@Mathworks505" "@Mathworks510" "@Mathworks515" "@Mathworks520" "@Mathworks525" "@Mathworks530" "@Mathworks535" "@Mathworks540" "@Mathworks545" Columns 110 through 118 "Cody550" "Cody555" "Cody560" "Cody565" "Cody570" "Cody575" "Cody580" "Cody585" "Cody590" "matlab550" "matlab555" "matlab560" "matlab565" "matlab570" "matlab575" "matlab580" "matlab585" "matlab590" "Simulink550" "Simulink555" "Simulink560" "Simulink565" "Simulink570" "Simulink575" "Simulink580" "Simulink585" "Simulink590" "@Mathworks550" "@Mathworks555" "@Mathworks560" "@Mathworks565" "@Mathworks570" "@Mathworks575" "@Mathworks580" "@Mathworks585" "@Mathworks590" Columns 119 through 127 "Cody595" "Cody600" "Cody605" "Cody610" "Cody615" "Cody620" "Cody625" "Cody630" "Cody635" "matlab595" "matlab600" "matlab605" "matlab610" "matlab615" "matlab620" "matlab625" "matlab630" "matlab635" "Simulink595" "Simulink600" "Simulink605" "Simulink610" "Simulink615" "Simulink620" "Simulink625" "Simulink630" "Simulink635" "@Mathworks595" "@Mathworks600" "@Mathworks605" "@Mathworks610" "@Mathworks615" "@Mathworks620" "@Mathworks625" "@Mathwor...