Describe your issue in detail here.
I don’t understand how to assign the value returned by alphabet.find(char) to index.
Your code so far
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
# User Editable Region
for char in text:
index = 82
print(char)
#I added up the value of alphabet.find(char) and got 82. What did I do wrong?
# 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.1 Safari/605.1.15
Challenge Information:
Learn String Manipulation by Building a Cipher - Step 27
Inside the for loop, before printing the current character, declare a variable called index and assign the value returned by alphabet.find(char) to this variable.
This challenge wants you to code a variable using the .find method.
Inside the for loop, declare the new variable and assign it the expression mentioned in the instructions.