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

16 lines
278 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 > 25:
t = t - 26
res += alph[t]
print(res)