A simple and beginner-friendly Bank Management System in Python using Object-Oriented Programming (OOP) and File Handling (accounts.txt, transactions.txt).
This project supports account creation, secure login, deposits, withdrawals, and full transaction history tracking.
- User name input
- 5-digit numeric password validation
- Auto-generated 5-digit unique account number
- Initial deposit stored in both account file & transaction history
- Password protected
- Loads accounts from
accounts.txt - Prevents login until account is saved in memory
- Updates account balance
- Saves each transaction in
transactions.txt - Fully recorded with date & time
- Shows current balance instantly
- Displays all deposits & withdrawals for that specific account
- Reads from
transactions.txt
accounts.txt→ stores all accountstransactions.txt→ stores all transactions
- Python 3
- OOP (Classes & Objects)
- File Handling
- Datetime module
User enters name → password → initial deposit
Program generates unique 5-digit account number.
Stored in: accounts.txt transactions.txt
User enters:
- Account Number
- Password
If matched → user menu opens.
Each action updates:
- Memory (runtime)
- File storage
- Transaction record
Reads all lines from transactions.txt matching the account number.
40528 | Deposit | 5000 | 2025-11-12 21:30:45.923842 40528 | Withdraw | 1000 | 2025-11-12 22:00:01.312582