Files
nsi/Activity_3_python/exercise_3/ex3_6_2.py
T
2023-11-28 22:07:56 +01:00

16 lines
277 B
Python

msg = input("Message à coder ? ")
res = ""
alph = 'abcdefghijklmnopqrstuvwxyz'
for i in msg:
if i == ' ' or i =="'":
res += i
else:
p = alph.find(i)
t = p - 3
if t < 0:
t = 26 + t
res += alph[t]
print(res)