Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Substitution-cipher/11l/substitution-cipher.11l
Normal file
18
Task/Substitution-cipher/11l/substitution-cipher.11l
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
V key = ‘]kYV}(!7P$n5_0i R:?jOWtF/=-pe'AD&@r6%ZXs"v*N[#wSl9zq2^+g;LoB`aGh{3.HIu4fbK)mU8|dMET><,Qc\C1yxJ’
|
||||
|
||||
F encode(s)
|
||||
V r = ‘’
|
||||
L(c) s
|
||||
r ‘’= :key[c.code - 32]
|
||||
R r
|
||||
|
||||
F decode(s)
|
||||
V r = ‘’
|
||||
L(c) s
|
||||
r ‘’= Char(code' :key.index(c) + 32)
|
||||
R r
|
||||
|
||||
V s = ‘The quick brown fox jumps over the lazy dog, who barks VERY loudly!’
|
||||
V enc = encode(s)
|
||||
print(‘Encoded: ’enc)
|
||||
print(‘Decoded: ’decode(enc))
|
||||
Loading…
Add table
Add a link
Reference in a new issue