Learn String Manipulation by Building a Cipher - Step 16

Tell us what’s happening:

Hi, I am not sure if I understand the question right.
I think I have to have a value equals to shift + alphabet in index
and it should be 10 (7+3)
I can’t figure out which step I was wrong…

Your code so far


# User Editable Region

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

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 16

1 Like

Welcome to the forum @c7xvc4m8tp

The instructions mention accessing an index of an array.

Happy coding

1 Like

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