Learn String Manipulation by Building a Cipher - Step 13

Tell us what’s happening:

Can anyone tell me what´s wrong?:

Instructions:
Step 13
You are going to use the .find() method to find the position in the alphabet of each letter in your message.
At the end of your code, call .find() on alphabet and pass ‘z’ as the argument to the method.

alphabet = “abcdefghijklmnopqrstuvwxyz”
print(alphabet.find(“z”))

After checking my code webpage says “Sorry, your code does not pass. Try again.”, but the console returns a 25 value, so I don´t know where´s the error.

Your code so far


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = "abcdefghijklmnopqrstuvwxyz"
print(alphabet.find("z"))

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

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 13

are you asked to print the output of that?

it also says

You should call the .find() method on the alphabet variable and pass 'z' to the method. Pay attention to place the method call at the beginning of the line.

You are not placing the method at the beginning of the line, it’s inside a print

1 Like