# Learn String Manipulation by Building a Cipher - Step 12

**URL:** <https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [December 22, 2023, 4:18pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424 "2023-12-22T16:18:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AliRR](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@AliRR](https://forum.freecodecamp.org/u/AliRR)\
**Post date:** [December 22, 2023, 4:18pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/1 "2023-12-22T16:18:59Z")

</div>

Can someone please help me in Step 12 in python

```auto
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

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher/step-12)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 22, 2023, 4:59pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/2 "2023-12-22T16:59:50Z")

</div>

> [@AliRR](#):
>
> `alphabet = 'abcdefghijklmnopqrstuvwxyz"`

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,

> [@AliRR](#):
>
> `alphabet.find((text[0]), "a")`

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

---

<div class="post-metadata">

**Author:** ![AliRR](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@AliRR](https://forum.freecodecamp.org/u/AliRR)\
**Post date:** [December 22, 2023, 6:08pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/3 "2023-12-22T18:08:49Z")

</div>

can you please help me fix this code

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

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 22, 2023, 6:32pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/4 "2023-12-22T18:32:19Z")

</div>

pass `text[0]` to the function.

---

<div class="post-metadata">

**Author:** ![AliRR](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@AliRR](https://forum.freecodecamp.org/u/AliRR)\
**Post date:** [December 22, 2023, 7:06pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/5 "2023-12-22T19:06:13Z")

</div>

WHAT DOES IT MEAN???

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 22, 2023, 7:09pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/6 "2023-12-22T19:09:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AliRR](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@AliRR](https://forum.freecodecamp.org/u/AliRR)\
**Post date:** [December 22, 2023, 7:54pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/7 "2023-12-22T19:54:28Z")

</div>

can you tell me the code to pass  
pls

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 22, 2023, 7:55pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/8 "2023-12-22T19:55:20Z")

</div>

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.

 ![Pre-formatted-text](https://global.discourse-cdn.com/freecodecamp/original/3X/1/b/1b18854f1059217f29370444396145cc3a0cd8ae.gif)

See [this post](https://forum.freecodecamp.org/t/forum-code-formatting/25574) to find the backtick on your keyboard.  
**Note:** Backticks (`) are not single quotes (').

---

<div class="post-metadata">

**Author:** ![AliRR](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@AliRR](https://forum.freecodecamp.org/u/AliRR)\
**Post date:** [December 22, 2023, 7:56pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/9 "2023-12-22T19:56:28Z")

</div>

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

```

---

<div class="post-metadata">

**Author:** ![JeremyLT](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jeremylt/32/291894_2.png) [@JeremyLT](https://forum.freecodecamp.org/u/JeremyLT)\
**Post date:** [December 22, 2023, 7:58pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/10 "2023-12-22T19:58:08Z")

</div>

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

```auto
a_string.find(char)

```

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 22, 2023, 8:00pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/11 "2023-12-22T20:00:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AliRR](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@AliRR](https://forum.freecodecamp.org/u/AliRR)\
**Post date:** [December 22, 2023, 8:04pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/12 "2023-12-22T20:04:09Z")

</div>

yea screw this  
thanks for “helping” me

---

<div class="post-metadata">

**Author:** ![JeremyLT](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jeremylt/32/291894_2.png) [@JeremyLT](https://forum.freecodecamp.org/u/JeremyLT)\
**Post date:** [December 22, 2023, 8:05pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/13 "2023-12-22T20:05:44Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![AliRR](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@AliRR](https://forum.freecodecamp.org/u/AliRR)\
**Post date:** [December 22, 2023, 8:07pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/14 "2023-12-22T20:07:17Z")

</div>

can u plss tell me what to type in those

---

<div class="post-metadata">

**Author:** ![JeremyLT](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jeremylt/32/291894_2.png) [@JeremyLT](https://forum.freecodecamp.org/u/JeremyLT)\
**Post date:** [December 22, 2023, 8:08pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/15 "2023-12-22T20:08:15Z")

</div>

> [@JeremyLT](#):
>
> But we cannot write answers for users.

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.

---

<div class="post-metadata">

**Author:** ![AliRR](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@AliRR](https://forum.freecodecamp.org/u/AliRR)\
**Post date:** [December 22, 2023, 8:10pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/16 "2023-12-22T20:10:02Z")

</div>

like alphabet.fint(text[0])?

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 22, 2023, 8:10pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/17 "2023-12-22T20:10:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [December 22, 2023, 8:10pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/18 "2023-12-22T20:10:22Z")

</div>

why don’t you try this code?

---

<div class="post-metadata">

**Author:** ![AliRR](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@AliRR](https://forum.freecodecamp.org/u/AliRR)\
**Post date:** [December 22, 2023, 8:10pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/19 "2023-12-22T20:10:52Z")

</div>

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

```

---

<div class="post-metadata">

**Author:** ![JeremyLT](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jeremylt/32/291894_2.png) [@JeremyLT](https://forum.freecodecamp.org/u/JeremyLT)\
**Post date:** [December 22, 2023, 8:11pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424/20 "2023-12-22T20:11:20Z")

</div>

Where did the : come from?

[Next page](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-12/657424.md?page=2)
