Learn String Manipulation by Building a Cipher - Step 12

Can someone please help me in Step 12 in python

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


main.py

/* User Editable Region */

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

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

for some reasion you have changed one of the quotes of this string to a double quote, that would be one reasion for why it wouldn’t work

second,

find should only have one argument, and that should be the first letter of text, you should not write "a" there

can you please help me fix this code

text = ‘Hello World’
shift = 3
alphabet = “abcdefghijklmnopqrstuvwxyz”
alphabet.find(“a”):
text[0]

pass text[0] to the function.

WHAT DOES IT MEAN???

have you corrected your syntax error?

To pass something to a function means that you give it to the function as input, writing it between the round brackets used to call the function

can you tell me the code to pass
pls

no, I can’t

if you need more help you can show us the code you have now

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

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

You did not put the text[0] inside of the call to find()

a_string.find(char)

you also have not formatted your code, I have formatted the code for you, please format your code

yea screw this
thanks for “helping” me

1 Like

I’m happy to help more if you can tell me more about what has you confused. But we cannot write answers for users.

Your code needs to look almost identical to the example given, but with different things in place of a_string and char.

can u plss tell me what to type in those

We cannot write the code for you.

At the end of your code, call find() on your alphabet string and pass text[0] to the function.

These are the three things the instructions tell you to use.

like alphabet.fint(text[0])?

you need to use the find function with alphabet and text[0]

why don’t you try this code?

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

Where did the : come from?