Learn String Manipulation by Building a Cipher - Step 54

Tell us what’s happening:

I keep on getting the error that I should change the shift to offset, I’ve changed the ones in the defined function but somehow I still get the error. Could their be an error I am not seeing. Thank you.

Your code so far

text = 'Hello Zaira'
shift = 3

# User Editable Region

def caesar(message, offset):
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    encrypted_text = ''

    for char in message.lower():
        if char == ' ':
            encrypted_text += char
        else:
            index = alphabet.find(char)
            new_index = (message + offset ) % len(alphabet)
            encrypted_text += alphabet[new_index]
    print('plain text:', message)
    print('encrypted text:', encrypted_text)

caesar()

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 54

you replaced index, reset the step and try again

You changed this line too much.
The original line is:

new_index = (index + shift) % len(alphabet)

You should not change index