Learn String Manipulation by Building a Cipher - Step 14

Tell us what’s happening:

I replaced z with text[0] but it’s still not working can someone explain why

Your code so far


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
alphabet.find('text[0]')

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

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 14

Welcome to the forum @golden_knight

You should modify your existing alphabet.find('z') call passing text[0] to the method.

You are not asked to pass a string.

Happy coding

Ok thank you very much, but how do I know when to add single quotation marks and when not to?

1 Like

when it’s talking about a variable, don’t add quotation marks

Ok, thank you so much :grinning_face: