/* User Editable Region */
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = alphabet.find(text[0].lower()) + shift
print(index)
shifted =
/* 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 16
No worries, We’re kinda going the wrong way around atm. Remember the index variable is a number (7) and so is shift (3). So if you were to so index + shift we essentially get 10.
So instead of trying to get the letter h out of index we want to get index + shift out of alphabet, since we’re trying to find the letter at place 10.
So like I mentioned index + shift would be 10. If we wanted to get the letter at place 10 from alphabet we would do something like alphabet[10] and this would return us k. Instead of just writing 10 inside the brackets though, you will want to use the variables that the question wants you to use.