Learn String Manipulation by Building a Cipher - Step 31

Tell us what’s happening:

Hello! In step 31, my code is not being submitted and no errors are being shown.
Please guide me.

Your code so far


# User Editable Region

text = 'Hello World'
text = 'Albatross'

# User Editable Region

alphabet = 'abcdefghijklmnopqrstuvwxyz'

for char in text.lower():
    index = alphabet.find(char)
    print(char, index)
    new_index = index + shift

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 31

Welcome to the forum @dilyoradev

Here is a comparison of the original code and your code.

The code in blue is the original code, the code in red is your code.
The code in magenta is the overlap.

The shift variable is missing from your code.

I saw a trace back in the console.

image

Please reset the step to restore the seed code and try again.

Happy coding

1 Like