0

Secret message-Any suggestions?

Decoded="" alphabet = "abcdefghijklmnopqrstuvwxyz" reverse = alphabet[::-1] Secret=input("Write the secret code:").lower() for i in Secret: if i in alphabet: x=alphabet.find(i) Decoded+=reverse[x] elif i==" ": Decoded+=" " print(Decoded)

25th May 2020, 7:16 PM
Good coder
4 Respuestas
+ 2
Kuba Siekierzyński I believe this is what he is referring to. Not actually trying to create an encryption. https://www.sololearn.com/coach/66?ref=app
25th May 2020, 8:43 PM
ChaoticDawg
ChaoticDawg - avatar
+ 2
ChaoticDawg Gotcha!
25th May 2020, 9:22 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
Char for char replacement is trivial to break. And if you do not replace the space, it's simply like you're giving it away already ;) Try perhaps to get it more sophisticated, like replacing the character with another one depending on its position or the position of preceding character or the length of the text and so on. Here's a little spoiler: https://code.sololearn.com/cuKnuo01NOb9/?ref=app
25th May 2020, 8:23 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar