Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
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)
3 Respostas
+ 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
+ 2
ChaoticDawg Gotcha!
+ 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