Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 173820

Submitted on 6 Dec 2012 by James

Correct

18Size
Leading solution size is 12.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
s='ThE qUiCk BrOwN fOx JuMpEd OvEr ThE lAzY dOg';
se = 'YjR wIoVl NtPeM gPc Ki<[Rf PbRt YjR ;SxU fPh';
assert(isequal(Qwerty_encode(s),se))
mapped =
 !"#$%&'()*+,-./0123456789:;<=>?@SNVFRGHJOKL:<MP{WTDYIBECUX[\]^_`snvfrghjokl;,mp[wtdyibecux
ans =
YjR wIoVl NtPeM gPc Ki<[Rf PbRt YjR ;SxU fPh
2
Pass
 
%%
s='abcdefghijklmnopqrstuvwxyz';
se='snvfrghjokl;,mp[wtdyibecux'; % a-z
assert(isequal(Qwerty_encode(s),se))
mapped =
 !"#$%&'()*+,-./0123456789:;<=>?@SNVFRGHJOKL:<MP{WTDYIBECUX[\]^_`snvfrghjokl;,mp[wtdyibecux
ans =
snvfrghjokl;,mp[wtdyibecux
3
Pass
 
%%
s='ABCDEFGHIJKLMNOPQRSTUVWXYZ';
se='SNVFRGHJOKL:<MP{WTDYIBECUX'; % A-Z
assert(isequal(Qwerty_encode(s),se))
mapped =
 !"#$%&'()*+,-./0123456789:;<=>?@SNVFRGHJOKL:<MP{WTDYIBECUX[\]^_`snvfrghjokl;,mp[wtdyibecux
ans =
SNVFRGHJOKL:<MP{WTDYIBECUX
4
Pass
 
%%
s='You miss 100 percent of the shots you never take. Gretzky';
se='Upi ,odd 100 [rtvrmy pg yjr djpyd upi mrbrt yslr. Htryxlu';
assert(isequal(Qwerty_encode(s),se))
mapped =
 !"#$%&'()*+,-./0123456789:;<=>?@SNVFRGHJOKL:<MP{WTDYIBECUX[\]^_`snvfrghjokl;,mp[wtdyibecux
ans =
Upi ,odd 100 [rtvrmy pg yjr djpyd upi mrbrt yslr. Htryxlu
5
Pass
 
%%
s='Those who believe in telekinetics raise my hand. Vonnegut';
se='Yjpdr ejp nr;orbr om yr;rlomryovd tsodr ,u jsmf. Bpmmrhiy';
assert(isequal(Qwerty_encode(s),se))
mapped =
 !"#$%&'()*+,-./0123456789:;<=>?@SNVFRGHJOKL:<MP{WTDYIBECUX[\]^_`snvfrghjokl;,mp[wtdyibecux
ans =
Yjpdr ejp nr;orbr om yr;rlomryovd tsodr ,u jsmf. Bpmmrhiy