Learn String Manipulation by Building a Cipher - Step 30

can anyone please elaborate what must i do when i have reached here because it seems like i am confused ?

Your code so far


# User Editable Region

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

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

# 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 30

the end of the loop body means the next line after print(char, index), create a new variable named new_index and assign index + shift to it

2 Likes

Thanks to you that helped a lot :heart:

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.