Python icon indicating copy to clipboard operation
Python copied to clipboard

Built a simple BankAccount class in Python to understand the basics of Object-Oriented Programming (OOP). 📌 Key concepts used: Class and Object Constructor (__init__) Encapsulation (private variable) Method for checking account balance This small project helped me strengthen my foundation in Python and OOP concepts. Learning step by step and enjoying the process 🚀 #Python #OOP #Programming #Learning #BeginnerProject #EngineeringStudent

Open ayyanagoud12 opened this issue 1 month ago • 0 comments

class BankAccount: def init(self,account_number,balance): self.__account_number = account_number self.balance = balance

def check_balance(self):
    print("your account number is : ",self.__account_number)
    print("your available balance is :" ,self.balance)
    

b = BankAccount(281207,27000) b.check_balance()

ayyanagoud12 avatar Dec 19 '25 13:12 ayyanagoud12