Skip to content

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  #14024

@ayyanagoud12

Description

@ayyanagoud12

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions