Learn String Manipulation by Building a Cipher - Step 14

Tell us what’s happening:

i have tried to solve this problem for the past 1 hour and i still dont know how to do it. i have tried all the options and also watch some youtube videos

Your code so far


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = alphabet.find(text[3])
print(index)

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

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 14

Welcome to the forum @hong211

You should modify your existing alphabet.find('z') call passing text[0] to the method.

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.

You were not asked to assign the code to the index variable
Your argument does not contain the correct number for the index.

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

Happy coding