Cody

Solution 1192754

Submitted on 19 May 2017 by Said BOUREZG
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
inStr = 'doug'; shift = 10; outStr = 'nyeq'; assert(isequal(cypher(inStr, shift),outStr))

ans = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' s = 'noug' s = 'nyug' s = 'nyeg' s = 'nyeq'

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

ans = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' s = 'yhequickbrownfox' s = 'ymequickbrownfox' s = 'ymjquickbrownfox' s = 'ymjvuickbrownfox' s = 'ymjvzickbrownfox' s = 'ymjvznckbrownfox' s = 'ymjvznhkbrownfox' s = 'ymjvznhpbrownfox' s = 'ymjvznhpgrownfox' s = 'ymjvznhpgwownfox' s = 'ymjvznhpgwtwnfox' s = 'ymjvznhpgwtbnfox' s = 'ymjvznhpgwtbsfox' s = 'ymjvznhpgwtbskox' s = 'ymjvznhpgwtbsktx' s = 'ymjvznhpgwtbsktc'

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

ans = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' s = 'phecrowfliesatmidnight' s = 'pdecrowfliesatmidnight' s = 'pdacrowfliesatmidnight' s = 'pdayrowfliesatmidnight' s = 'pdaynowfliesatmidnight' s = 'pdaynkwfliesatmidnight' s = 'pdaynksfliesatmidnight' s = 'pdaynksbliesatmidnight' s = 'pdaynksbhiesatmidnight' s = 'pdaynksbheesatmidnight' s = 'pdaynksbheasatmidnight' s = 'pdaynksbheaoatmidnight' s = 'pdaynksbheaowtmidnight' s = 'pdaynksbheaowpmidnight' s = 'pdaynksbheaowpiidnight' s = 'pdaynksbheaowpiednight' s = 'pdaynksbheaowpieznight' s = 'pdaynksbheaowpiezjight' s = 'pdaynksbheaowpiezjeght' s = 'pdaynksbheaowpiezjecht' s = 'pdaynksbheaowpiezjecdt' s = 'pdaynksbheaowpiezjecdp'