Untitled
unknown
python
4 years ago
433 B
9
Indexable
pesan = str.upper(input('Masukkan: '))
pesanl = list(pesan)
num = list()
for i in range(len(pesanl)):
x = ord(pesanl[i])-65
num.append(x)
code = list()
num2 = list()
for i in range(len(num)):
x = num[i] + 10
num2.append(x)
if x > 26:
y = chr((x % 26)+65)
else:
y = chr(x+65)
code.append(y)
print('ord are:',num)
print('F(p( = (p+10) mod 26 are:', num2)
print('The code is:', code)Editor is loading...