can u just explain to me what should i do not give me the sulotion
# User Editable Region
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = (text[0]).lower()
print(index)
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Challenge Information:
Learn String Manipulation by Building a Cipher - Step 17
Remove the last print() call. Then, instead of text[0] , pass text[0].lower() to .find() and see the output.
This is the line of code which you started this step with:
index = alphabet.find(text[0])
You should not remove alphabet.find() but should instead pass text[0] qualified with the lower() method, so that you are searching for a lower case letter in your alphabet string.
This is because, in the previous step, the uppercase letter ‘H’ could not be found in alphabet, and the find() method accordingly returned a value of -1.