Learn String Manipulation by Building a Cipher - Step 27

Tell us what’s happening:

i have tried but still have failed, listened to the clues but nohing is workin i need help

Your code so far

text = 'Hello World'
shift = 3

# User Editable Region

alphabet = 'abcdefghijklmnopqrstuvwxyz'
for char in text:
    print(char)

# 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/123.0.0.0 Safari/537.36 Edg/123.0.0.0

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 27

Inside the for loop above the print statement, you need to create a variable called index. The variable index is supposed to be assigned to the value returned by alphabet.find(char).

Let me know what further assistance. Happy coding. :slight_smile:

What did you try?

Do you have any questions about the instructions or anything else?

2 Likes

please i need a deeper explanation especially in the last sentence. i want know where to put them and those stuff because ive tried many different things

1 Like

Inside the for loop, before printing the current character

for char in text:     #this line starts the for loop
    print(char)       #this line prints the current character

Your new line of code will go between those two lines

1 Like

Can you show an example of something you’ve tried?

It will help understand where you’re at and let us know what we need to explain.