Learn String Manipulation by Building a Cipher - Step 13

Tell us what’s happening:

how do i assign the value returned by alphabet.find(text[0])

Your code so far


/* User Editable Region */

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

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 13

You have already posted that questions earlier.

One more time:

Hello

You are currently assigning find() to print. The challenge wants you to assign find() to “index” and then print it out.

still cant figure it out

This your code is just fine. the only thing that you need to do is to remove the quotation mark from
'alphabet.find(text[0])' if you do that your code will work perfectly.

1 Like

Thank you so much for the info! It was kind of confusing because it never explain it that you shouldn’t add quotation mark :smiley: