Learn String Manipulation by Building a Cipher - Step 67

Tell us what’s happening:

i can’t understand this problem please tell me the error

Your code so far

 offset = alphabet.index(key_char)
            index = alphabet.find(char)

# User Editable Region

            new_index = (index + offset) % len(alphabet)
            encrypted_text += alphabet[new_index]
            key_index += 1
             else:
                encrypted_text += char
        return 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/126.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 67

You changed indentation in some sections of your page, you also have unwanted code.
What is this else for?

I suggest you reset the lesson and only change the necessary portions, only change the two print statements and not any other thing.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.