Answer to Question #333024 in Python for Alphabets square

Question #333024

Input 1


2315313134 5234423114


Output 1


hello world


Input 2


112234


Output 2


ago

1
Expert's answer
2022-04-24T17:16:24-0400
square = [list('abcde'),
          list('fghik'),
          list('lmnop'),
          list('qrstu'),
          list('vwxyz')]


inp = input()
strs = inp.split()


def decryptStr(str):
    lst = list(str)
    lst = [int(item) for item in lst]
    answ = ''
    for i in range(0, len(str), 2):
        x = lst[i]
        y = lst[i+1]
        answ += square[x-1][y-1]
    return answ


answ = ''
for i in strs:
    answ += decryptStr(i)
    answ += ' '


print(answ)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS