# Print function not executed in while loop

**URL:** <https://forum.freecodecamp.org/t/print-function-not-executed-in-while-loop/368039>\
**Category:** General\
**Created:** [April 4, 2020, 1:26pm UTC](https://forum.freecodecamp.org/t/print-function-not-executed-in-while-loop/368039 "2020-04-04T13:26:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manoj123](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Manoj123](https://forum.freecodecamp.org/u/Manoj123)\
**Post date:** [April 4, 2020, 1:26pm UTC](https://forum.freecodecamp.org/t/print-function-not-executed-in-while-loop/368039/1 "2020-04-04T13:26:37Z")

</div>

```python
Import sys
Classs Bank():

    def __init__ (self, name, balanace= 0)
        self.name = name
        self.balance= balance

    def deposit(self, amount)
        self.balance+= amount
        return self.balance

    def withdraw(self, amount)
        If amount > self.balance
            print("balance is low")
        else:
            Self.balance-= amount
            return self.balance

Name = input("enter your name")
b = Bank(name)
Choice= input("Enter choice")
While (True)
If choice == 'e':
    print(" thank you")
    sys.exit()
If choice== 'd':
    print("your balance is ", 
  b.diposit(amount)

```

---

<div class="post-metadata">

**Author:** ![Sky020](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sky020/32/128093_2.png) [@Sky020](https://forum.freecodecamp.org/u/Sky020)\
**Post date:** [April 4, 2020, 2:05pm UTC](https://forum.freecodecamp.org/t/print-function-not-executed-in-while-loop/368039/2 "2020-04-04T14:05:25Z")

</div>

I’ve edited your post 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.

See [this post](http://www.freecodecamp.com/forum/t/forum-code-formatting/25574) to find the backtick on your keyboard. The “preformatted text” tool in the editor (`</>`) will also add backticks around text.

**Note:** Backticks are not single quotes.

![markdown_Forums](https://sea3.discourse-cdn.com/freecodecamp/uploads/default/original/3X/4/b/4b9a26f0c243380dd84935f4e29b92e3ecee8d05.gif)

---

<div class="post-metadata">

**Author:** ![Sky020](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sky020/32/128093_2.png) [@Sky020](https://forum.freecodecamp.org/u/Sky020)\
**Post date:** [April 4, 2020, 2:08pm UTC](https://forum.freecodecamp.org/t/print-function-not-executed-in-while-loop/368039/3 "2020-04-04T14:08:51Z")

</div>

Hello there.

It is difficult to help you with Python code, if it is not formatted correctly, because the Python interpreter requires correct indentation.

Please go over your code in your post, and edit it to represent what you have on your local workspace. As it stands, your indentation is incorrect. So, not much will work. Also, you have typos and syntax errors all throughout.

---

<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:** [June 1, 2021, 7:00pm UTC](https://forum.freecodecamp.org/t/print-function-not-executed-in-while-loop/368039/4 "2021-06-01T19:00:16Z")

</div>

Closed on June 1, 2021, 7:00pm UTC


