Learn String Manipulation by Building a Cipher - Step 19

Tell us what’s happening:

i can’t get this to work am i doing something wrong?

Your code so far


# User Editable Region

text = 'Hello World'
shifted = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = alphabet.find(text[0].lower())
print(alphabet[index])

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 19

Hi, welcome to the forum!

Declare a new variable named shifted.

You’ve renamed the shift variable to shifted instead of creating a new variable.

Use the bracket notation to access the value of alphabet at index index and assign it to your new variable.

You’ve assigned it “3” instead of what’s indicated above. There is no mention of modifying the print statement in the instructions.

You can reset this step and try it again.

oh thank you for your help

1 Like