Cody

# Problem 1201. Simple Decoder Ring

Solution 2173465

Submitted on 24 Mar 2020
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   Fail
inString1 = 'I am ready to try it - with punctuation and CAPS!'; outString1a = 'F xj obxav ql qov fq - tfqe mrkzqrxqflk xka ZXMP!'; assert(isequal(simpleDecoderRing(inString1,-3),outString1a ));

Unrecognized function or variable 'SinString'. Error in simpleDecoderRing (line 7) for i = 1:length(SinString) Error in Test1 (line 3) assert(isequal(simpleDecoderRing(inString1,-3),outString1a ));

2   Fail
inString1 = 'I am ready to try it - with punctuation and CAPS!'; outString1b = 'L dp uhdgb wr wub lw - zlwk sxqfwxdwlrq dqg FDSV!'; assert(isequal(simpleDecoderRing(inString1,3),outString1b ));

Unrecognized function or variable 'SinString'. Error in simpleDecoderRing (line 7) for i = 1:length(SinString) Error in Test2 (line 3) assert(isequal(simpleDecoderRing(inString1,3),outString1b ));

3   Fail
inString2 = 'Dick Tracy is often associated with decoder rings.'; outString2a = 'Lqks Bzikg qa wnbmv iaawkqibml eqbp lmkwlmz zqvoa.'; assert(isequal(simpleDecoderRing(inString2,-18),outString2a ));

Unrecognized function or variable 'SinString'. Error in simpleDecoderRing (line 7) for i = 1:length(SinString) Error in Test3 (line 3) assert(isequal(simpleDecoderRing(inString2,-18),outString2a ));

4   Fail
inString2 = 'Dick Tracy is often associated with decoder rings.'; outString2b = 'Zeyg Pnwyu eo kbpaj wookyewpaz sepd zaykzan nejco.'; assert(isequal(simpleDecoderRing(inString2,22),outString2b ));

Unrecognized function or variable 'SinString'. Error in simpleDecoderRing (line 7) for i = 1:length(SinString) Error in Test4 (line 3) assert(isequal(simpleDecoderRing(inString2,22),outString2b ));

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!