Cody

Solution 936110

Submitted on 14 Aug 2016
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
n = 3; str = 'Hello World!'; correct = 'Khoor Zruog!'; assert(isequal(codewheel(str,n),correct))

out = Khoor Zruog!

2   Fail
n = -6; str = 'Punctuation won''t be *too* much of a problem, will it?'; correct = 'Johwnouncih qih''n vy *nii* gowb iz u jlivfyg, qcff cn?'; assert(isequal(codewheel(str,n),correct))

out = Joh]no[ncih qih'n \_ *nii* go]b i` [ jli\f_g, qcff cn?

Assertion failed.

3   Fail
n = 72; str = 'Words, words, words.'; correct = 'Qilxm, qilxm, qilxm.' assert(isequal(codewheel(str,n),correct))

correct = Qilxm, qilxm, qilxm. out = Ÿ·º¬», ¿·º¬», ¿·º¬».

Assertion failed.

4   Fail
n = -286 str = 'Massively negative values for ''n'' shouldn''t pose a problem.' correct = 'Massively negative values for ''n'' shouldn''t pose a problem.' assert(isequal(codewheel(str,n),correct))

n = -286 str = Massively negative values for 'n' shouldn't pose a problem. correct = Massively negative values for 'n' shouldn't pose a problem. out = ' ' ' .

Assertion failed.