Learn String Manipulation by Building a Cipher - Step 50

Tell us what’s happening:

Describe your issue in detail here.
I’ve created a new function ceasar() and indented every subsequent line. but there’s still error. what is wrong?

User Editable Region

text = ‘Hello Zaira’
shift = 3
def ceasar():
alphabet = ‘abcdefghijklmnopqrstuvwxyz’
encrypted_text = ‘’

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

User Editable Region

Your code so far


# User Editable Region

text = 'Hello Zaira'
shift = 3
def ceasar():
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    encrypted_text = ''

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

# 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/121.0.0.0 Safari/537.36 Edg/121.0.0.0

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 50

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Welcome to the forum @ash1985

You have a typo.

where is this typo?
i tried editing, no change. still error

Copy the function name from the instructions.

Hi @ash1985

You’ve typed in cEAsar when the instructions ask for cAEsar. It’s a tiny error, but significant enough to break things.
Hope this helps.

oh gosh.
thanks for the help!