Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
inStr = 'doug';
shift = 10;
outStr = 'nyeq';
assert(isequal(cypher(inStr, shift),outStr))
shift =
10
x =
100 111 117 103
w =
110 121 127 113
w =
110 121 101 113
w =
110 121 101 113
outStr =
'nyeq'
|
2 | Pass |
inStr = 'thequickbrownfox';
shift = 5;
outStr = 'ymjvznhpgwtbsktc';
assert(isequal(cypher(inStr, shift),outStr))
shift =
5
x =
116 104 101 113 117 105 99 107 98 114 111 119 110 102 111 120
w =
121 109 106 118 122 110 104 112 103 119 116 124 115 107 116 125
w =
121 109 106 118 122 110 104 112 103 119 116 98 115 107 116 99
w =
121 109 106 118 122 110 104 112 103 119 116 98 115 107 116 99
outStr =
'ymjvznhpgwtbsktc'
|
3 | Pass |
inStr = 'thecrowfliesatmidnight';
shift = 22;
outStr = 'pdaynksbheaowpiezjecdp';
assert(isequal(cypher(inStr, shift),outStr))
shift =
22
x =
116 104 101 99 114 111 119 102 108 105 101 115 97 116 109 105 100 110 105 103 104 116
w =
138 126 123 121 136 133 141 124 130 127 123 137 119 138 131 127 122 132 127 125 126 138
w =
112 100 97 121 110 107 115 98 104 101 97 111 119 112 105 101 122 106 101 99 100 112
w =
112 100 97 121 110 107 115 98 104 101 97 111 119 112 105 101 122 106 101 99 100 112
outStr =
'pdaynksbheaowpiezjecdp'
|
Find all elements less than 0 or greater than 10 and replace them with NaN
13048 Solvers
Program an exclusive OR operation with logical operators
639 Solvers
Find a subset that divides the vector into equal halves
332 Solvers
Simple equation: Annual salary
3779 Solvers
272 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!