+ 3

[SOLVED] Sololearn secret message problem

ALARM 🚨 SPOILER 🚨 if you like to solve sololearn's problems you may want to try your own way before to see the code. If you don't fear any spoiler, check that! https://code.sololearn.com/c1wEgukJ5hUL/?ref=app If you try it with the problem, the first time it works like a charm. The second time the output is missing the first character. Then I don't know, cause I am not pro. Do you have any idea about why the code doesn't work properly?

18th Oct 2020, 2:37 PM
Davide
Davide - avatar
5 Respuestas
+ 3
Oh I see.In this question ,they told that the letter should be converted to lower case.So whenever I give input H you should take it as h and convert it to the backward version but in your code when I give a capital letter it shows no output .This might be the problem.
18th Oct 2020, 3:15 PM
The future is now thanks to science
The future is now thanks to science - avatar
+ 2
Koral Q the coach supplies the input. It's a string. Then we need to sub each character for the character it matches places with in a backwards alphabet. a-->z e-->v and so on.
18th Oct 2020, 3:12 PM
Slick
Slick - avatar
+ 2
Koral Q you're right! I am going to fix the issue. Many thanks!🤗
18th Oct 2020, 3:18 PM
Davide
Davide - avatar
+ 1
Sorry for asking but can you give the description of that code coach ? because I am using sololearn website.
18th Oct 2020, 3:08 PM
The future is now thanks to science
The future is now thanks to science - avatar
0
Koral Q 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
18th Oct 2020, 3:10 PM
Davide
Davide - avatar