Learn String Manipulation by Building a Cipher - Step 13

Tell us what’s happening:

Describe your issue in detail here.

Your code so far


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
 alphabet = alphabet.find(text[0])
print(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/121.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 13

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

this line should be without the space at the beginning, also this step you are not asked to assign anything or print anything, remove alphabet = and print(alphabet)

thank you so much
here is the question

text.find('W')

Above, uppercase 'W' is the character you want to locate inside the string stored in the text variable. The method will return 6, which is the index of the 'W' character inside the string stored in the text variable.

At the end of your code, call .find() on your alphabet string and pass text[0] to the method. Note that a method is just a function that belongs to an object (you will learn more about that in another project).

text = ‘Hello World’
shift = 3
alphabet = ‘abcdefghijklmnopqrstuvwxyz’

result = alphabet.find(text[0])

Kindly help

do not assign to anything, just write the requested expression

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.