Skip to content

yachikadev/python-bank-account-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

🏦 Python Bank Account System

A console-based personal bank account system built with Python.
This project covers Object-Oriented Programming (OOP), custom exceptions, and error handling.


✨ Features

  • 🏧 Create a bank account with an opening balance
  • 💰 Deposit money
  • 💸 Withdraw money (with balance check)
  • 🔄 Transfer money between two accounts
  • 📋 View full transaction history with timestamps
  • ❌ Custom error handling for invalid inputs

🛠️ Concepts Used

Concept Where Used
OOP (Classes & Objects) BankAccount class
Encapsulation Private __balance, __transactions
Custom Exceptions InsufficientFundsError, InvalidAmountError
Error Handling try/except blocks
Properties @property for balance

🚀 How to Run

python bank_account.py

No external libraries needed — pure Python! 🐍


📁 Project Structure

python-bank-account-system/
│
├── bank_account.py   # Main project file
├── README.md         # Project documentation
└── .gitignore        # Python gitignore

📌 Example Output

🏦 Welcome to PyBank!
✅ ₹2000.00 deposited. New balance: ₹7000.00
✅ ₹500.00 withdrawn. New balance: ₹6500.00
🔄 ₹1500.00 transferred to Bob's account.
⚠️ Testing Error Handling:
❌ InsufficientFundsError: Cannot withdraw ₹99999.00. Available balance: ₹2500.00
❌ InvalidAmountError: Amount must be positive. Got: ₹-200
❌ TypeError: Amount must be a number, got str

👩‍💻 Author

Yachika Sharma@yachikadev


⭐ If you found this helpful, consider giving it a star!

About

A console-based personal bank account system built with Python — covers OOP, custom exceptions, and error handling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages