# Learn String Manipulation by Building a Cipher - Step 50

**URL:** <https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-50/686945>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [April 24, 2024, 12:52pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-50/686945 "2024-04-24T12:52:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajayreddyyamala](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ajayreddyyamala/32/322801_2.png) [@ajayreddyyamala](https://forum.freecodecamp.org/u/ajayreddyyamala)\
**Post date:** [April 24, 2024, 12:52pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-50/686945/1 "2024-04-24T12:52:34Z")

</div>

### Tell us what’s happening:

can anyone help me it is showing me some indent error and not able to get it

### Your code so far

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

```auto
text = 'Hello Zaira'
shift = 3
def caesar ():
        alphabet = 'abcdefghijklmnopqrstuvwxyz'
        encrypted_text = ''
        for char in text.lower():
            if char == ' ':
                encrypted_text += char
            else:
                index = alphabet.find(char)
                new_index = (index + shift) % len(alphabet)
                encrypted_text += alphabet[new_index]    
        print('plain text:', text)
        print('encrypted text:', encrypted_text)
caesar()

```

### Challenge Information:

Learn String Manipulation by Building a Cipher - Step 50

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher/step-50)**
>
> 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:** [April 24, 2024, 12:53pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-50/686945/2 "2024-04-24T12:53:25Z")

</div>

> You should indent all the lines after `shift = 3` so that they become your new function body.

You are missing one line, the last line of code is not indented

---

<div class="post-metadata">

**Author:** ![ajayreddyyamala](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ajayreddyyamala/32/322801_2.png) [@ajayreddyyamala](https://forum.freecodecamp.org/u/ajayreddyyamala)\
**Post date:** [April 24, 2024, 1:07pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-50/686945/3 "2024-04-24T13:07:46Z")

</div>

made changes but still not able to solve without calling function

---

<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:** [April 24, 2024, 1:10pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-50/686945/4 "2024-04-24T13:10:43Z")

</div>

I’ve edited your code for readability. 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:** ![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:** [April 24, 2024, 1:11pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-50/686945/5 "2024-04-24T13:11:39Z")

</div>

with or without the function call your code passes, the function call is irrelevant for the tests

---

<div class="post-metadata">

**Author:** ![ajayreddyyamala](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ajayreddyyamala/32/322801_2.png) [@ajayreddyyamala](https://forum.freecodecamp.org/u/ajayreddyyamala)\
**Post date:** [April 24, 2024, 1:16pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-50/686945/6 "2024-04-24T13:16:46Z")

</div>

Thankyou for considering my request

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [October 24, 2024, 1:17am UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-50/686945/7 "2024-10-24T01:17:05Z")

</div>

Closed on October 24, 2024, 1:17am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
