+ 1
Small challenge for beginners
try to translate this sentence by coding if you know that: r-->p j-->h k jqrg aqw fkfp'v vjg vtcpuncvkqp da jcpf. vjg eqorwvgtu ctg hqt vjcv. fqkpi vjg vtcpuncvkqp da jcpf ku vqq nqpi cpf kpghhkekgpv cpf vjcv'u yja vjku vgzv ku uq nqpi. aqw ecp wug uvt.ocmgvtcpu() (hqt ravjqp 3) qt uvtkpi.ocmgvtcpu () (hqt ravjqp2.z). pqy kh aqw fkf kv da jcpf tgfq kv da eqfg, iqqf post just the code not the translation. good luck
3 Answers
+ 1
test = '''k jqrg aqw fkfp'v vjg vtcpuncvkqp da jcpf.
vjg eqorwvgtu ctg hqt vjcv. fqkpi vjg vtcpuncvkqp
da jcpf ku vqq nqpi cpf kpghhkekgpv cpf vjcv'u
yja vjku vgzv ku uq nqpi. aqw ecp wug
uvt.ocmgvtcpu() (hqt ravjqp 3) qt
uvtkpi.ocmgvtcpu () (hqt ravjqp2.z).
pqy kh aqw fkf kv da jcpf tgfq kv da eqfg, iqqf
'''
letters = 'abcdefghijklmnopqrstuvwxyz'
print(''.join([(letters[letters.find(item)-2])if item in letters else item for item in test]))
0
right @richard
can an other one post a different code?
0
cod = "k jqrg aqw fkfp'v vjg vtcpuncvkqp da jcpf. vjg eqorwvgtu ctg hqt vjcv. fqkpi vjg vtcpuncvkqp da jcpf ku vqq nqpi cpf kpghhkekgpv cpf vjcv'u yja vjku vgzv ku uq nqpi. aqw ecp wug uvt.ocmgvtcpu() (hqt ravjqp 3) qt uvtkpi.ocmgvtcpu () (hqt ravjqp2.z). pqy kh aqw fkf kv da jcpf tgfq kv da eqfg, iqqf"
table = str.maketrans("abcdefghijklmnopqrstuvwxyz", "yzabcdefghijklmnopqrstuvwx")
print(cod.translate(table))