Answer to Question #282659 in Python for Abhi

Question #282659

Given a string write a program to print the mirror of string in Alphabetical order to create a secret message

Note Mirror means a with z , b with y and so on


1
Expert's answer
2021-12-27T08:41:24-0500
letters1='abcdefghijklm'
letters2='zyxwvutsrqpon'
s=input()
result=''
for x in s:
    if x.lower() in letters1:
        result=result+letters2[letters1.find(x.lower())]
    elif x.lower() in letters2:
        result = result + letters1[letters2.find(x.lower())]
print(result)

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