Learn String Manipulation by Building a Cipher - Step 12

Tell us what’s happening:

Step 12

The first kind of cipher you are going to build is called a Caesar cipher. Specifically, you will take each letter in your message, find its position in the alphabet, take the letter located after 3 positions, and replace the original letter with the new letter.

Start by finding the position of the first letter in the string. One way is to use the built-in find() function:


Above, char is the character you want to locate, and a_string is the string you want to parse.

At the end of your code, call find() on your alphabet string and pass text[0] to the function.

I cannot understand this

# User Editable Region

alphabet = 'abcdefghijklmnopqrstuvwxyz'
a_string = "hello"
char = "h"
position = a_string.find(alphabet)

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

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 12

Please, reset your code before trying again.

You need to call the .find() method on alphabet and pass text[0] to the method.

To call .find() on x means: x.find()
And passing y to a method means adding y between the parenthesis.

You need to do this in a single line of code.