Print function not executed in while loop

Import sys
Classs Bank():

    def __init__(self, name, balanace= 0) = 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")
            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")
If choice== 'd':
    print("your balance is ", 

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


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.