+ 2

# Can't understand code coach Secret message

You are trying to send a secret message, and you've decided to encode it by replacing every letter in your message with its corresponding letter in a backwards version of the alphabet. What do your messages look like? Task: Create a program that replaces each letter in a message with its corresponding letter in a backwards version of the English alphabet. Input Format: A string of your message in its normal form. Output Format: A string of your message once you have encoded it (all lower case). Sample Input: Hello World Sample Output: svool dliow How is this possible??

4th Nov 2020, 1:10 PM
+ 5
Starting from A we count 1+6 more alphabets to reach H Now if we move 7 letters back starting from Z we get Z,Y,X,W,V,U,T and finally S
4th Nov 2020, 1:14 PM
Abhay
+ 3
Why do you think its not possible.. Any points???
4th Nov 2020, 1:12 PM
Steve Sajeev
+ 3
"encode it by replacing every letter in your message with its corresponding letter in a backwards version of the alphabet." Couldn't say it any clearer
4th Nov 2020, 2:14 PM
Benjamin Jürgens
+ 2
[I'm new in 2022, it's take my 3hr, but i solved it painful:] 🥱🥱 import string txt = str(input()) txte = txt.lower() alphab = list(string.ascii_lowercase) #print(alphab[::-1][7]) for t in txte.split(" "): oupt = "" for j in t: for i in range(0,len(alphab)): if j == alphab[i]: oupt+=alphab[::-1][i] print(oupt,end=" ")
2nd Feb 2022, 7:34 AM
Moussa Diallo
0
Steve Sajeev I can't understand how that result comes from string "Hello World"
4th Nov 2020, 1:14 PM