Cody

Solution 1991786

Submitted on 26 Oct 2019
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
inStr = 'doug'; shift = 10; outStr = 'nyeq'; assert(isequal(cypher(inStr, shift),outStr))

a = 'abcdefghijklmnopqrstuvwxyz' c = 1×26 logical array 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 a = 'qrstuvwxyzabcdefghijklmnop' outStr = 'twek'

Assertion failed.

2   Fail
inStr = 'thequickbrownfox'; shift = 5; outStr = 'ymjvznhpgwtbsktc'; assert(isequal(cypher(inStr, shift),outStr))

a = 'abcdefghijklmnopqrstuvwxyz' c = 1×26 logical array 0 1 1 0 1 1 0 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 0 a = 'vwxyzabcdefghijklmnopqrstu' outStr = 'wxzacdfijlmoprs'

Assertion failed.

3   Fail
inStr = 'thecrowfliesatmidnight'; shift = 22; outStr = 'pdaynksbheaowpiezjecdp'; assert(isequal(cypher(inStr, shift),outStr))

a = 'abcdefghijklmnopqrstuvwxyz' c = 1×26 logical array 1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 0 0 1 0 0 0 a = 'efghijklmnopqrstuvwxyzabcd' outStr = 'eghijklmpqrsvwxa'

Assertion failed.