Learn String Manipulation by Building a Cipher - Step 12

Tell us what’s happening:

Describe your issue in detail here.

Your code so far


/* User Editable Region */

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


/* 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 12

please i am stocked here

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Please what is the find() method for the cipher.

Hello Atatem,

You’re getting closer! So instead of editting the alphabet string directly. You should keep the alphabet = 'abcdefghijklmnopqrstuvwxyz' as it was and leave that alone. (Also make sure there’s no spaces before it).

Instead on a new line you have to call the part you wrote .find(text[0]) on the alphabet variable.

Hello HungryBee,what is the alphabet variable?

This is where you made the alphabet variable. So alphabet is the variable name.

Please how do i input this variable into the Find() element.

What you did here was almost there, you just have to put the variable name, that I mentioned last post, before it.

Ok let me try that it that way.
its not Still Working.

Let me know how it went, if it didnt work please post your full code again.

/* User Editable Region */

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

/* User Editable Region */

Yes great! This should pass the test.

But its not passing.

Try to reset the step and only add the last line.

1 Like

Thank you, it has passed.

1 Like

Please help me here,
text = ‘Hello World’

shift = 3

alphabet = ‘abcdefghijklmnopqrstuvwxyz’

index = ‘alphabet.find(text[0])’

print(index)

You don’t use quotes in this context, that’s mostly used for strings. If you remove them after your index call it should pass.

But if you have help on other questions please make sure to make a new topic using the help button again as it will be tough to help you otherwise.

1 Like

Thank you it has passed.
Hey I would like to be freinds with you.
I dont know how you would see this! :kissing_heart:

1 Like

I consider everyone here friends since we are all trying to improve and learn. :blush:

1 Like

Maybe you do but kind of special freinds ,such you can be my mentor.