Learn String Manipulation by Building a Cipher - Step 15

Tell us what’s happening:

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

Your code so far


# User Editable Region

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

# 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 15

Tell us what’s happening:

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

Your code so far


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index ='alphabet.find(text[0])'
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 15

Hi @Grace25

You should assign the value returned by alphabet.find(text[0]) to your index variable.

If you place quote marks around a value it becomes a string.

Happy coding

I went ahead and combined your posts for you. In the future, just reply to the original thread to add further updates.

Thanks.

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