+ 1
Can anyone tell me why is my code considered wrong by the app while it actually works fine. And is there any better way to do it
My personal attempt of solving the code coach challenge of "secret message" https://code.sololearn.com/c9pCtf52k9DV/?ref=app Task: Create a program that replaces each letter in a message with its corresponding letter in a backwards version of the English alphabet.
3 Réponses
+ 2
Your code looks fine. I managed to pass it with my code, but with a different method. Without being able to see what the test cases are, it is hard to say.
My method strips out numbers, though.
so:
123hello gives 123svool in your code and only gives svool in mine.
I don't know if this is the case, but I think your implementation is actually better. But mine passed the test. So how about stripping out the numerals?
https://code.sololearn.com/c1Zy6PssOpAc/?ref=app
+ 1
Bob_Li Well, thank you. I found the problem: it turned out that i forgot to use the lower() function in the 10th line but i fixed it. And i'll leave it here so anyone can benefit from it. It works fine now.
+ 1
Great. I didn't try to test with uppercase. So my buggy code which strips numerals passed too. Loophole in the test cases?