Tell us what’s happening:
You are going to use the .find() method to find the position in the alphabet of each letter in your message. A method is similar to a function, but it belongs to an object.
Example Code
sentence = ‘My brain hurts!’
sentence.find(‘r’)
Above, the .find() method is called on sentence (the string to search in), and ‘r’ (the character to locate) is passed as the argument. The sentence.find(‘r’) call will return 4, which is the index of the first occurrence of ‘r’ in sentence.
At the end of your cod
Your code so far
# User Editable Region
text = 'Hello World
sentences.find(alphabet'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/135.0.0.0 Safari/537.36
Challenge Information:
Learn String Manipulation by Building a Cipher - Step 13