+ 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

30th Dec 2016, 12:31 AM
Minovsky
Minovsky - avatar
3 Réponses
+ 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]))
30th Dec 2016, 4:03 AM
richard
0
right @richard can an other one post a different code?
30th Dec 2016, 7:03 AM
Minovsky
Minovsky - avatar
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))
28th Jul 2022, 9:31 AM
Sennin