Learn String Manipulation by Building a Cipher - Step 23

Tell us what’s happening:

I don’t understand why it isn’t working

Your code so far


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'

for char in text:
index = alphabet.find(char)
print(char)

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 23

You haven’t indented the code inside the for loop. The code is perfectly fine.

Thank you so much! This was very helpful

2 Likes