Cuéntanos qué está pasando:
I can’t find the error, it is well identified, the code through the console passes fine, it throws me this error:
You should rename all occurrences of text to message.
Help me!
Tu código hasta el momento
text = 'Hello Zaira'
shift = 3
# User Editable Region
def caesar(message = text, offset = shift):
alphabet = 'abcdefghijklmnopqrstuvwxyz'
encrypted_text = ''
for char in text.lower():
if char == ' ':
encrypted_text += char
else:
index = alphabet.find(char)
new_index = (index + offset) % len(alphabet)
encrypted_text += alphabet[new_index]
print('plain message:', message)
print('encrypted text:', encrypted_text)
caesar()
# User Editable Region
Información de tu navegador:
El agente de usuario es: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Información del Desafío:
Aprenda la Manipulación de Cadenas Construyendo un Cipher - Step 54