A fully functional ATM Machine simulation built in Python — console-based banking with PIN security, deposits, withdrawals, and transaction history.
A fully functional ATM Machine simulation built in Python. This console-based banking system allows users to:
- Check balance
- Deposit and withdraw cash
- View full transaction history
All secured with a PIN authentication system. Data is persisted across sessions using local file storage.
| Feature | Description |
|---|---|
| 🔐 PIN Security | 4-digit PIN with 3 attempt lockout |
| 💰 Check Balance | View real-time account balance in PKR |
| 📥 Deposit Cash | Add funds, balance saved instantly |
| 📤 Withdraw Cash | Withdraw with insufficient-funds protection |
| 📋 Transaction History | Every action timestamped and saved |
| 💾 Data Persistence | Balance and history saved between sessions |
# Step 1 — Clone the repository
git clone https://github.com/HaiderNeuralNet/ATM-Machine.git
# Step 2 — Navigate to project folder
cd ATM-Machine
# Step 3 — Run the program
python atm.pyPIN : 8917
Balance : 1000.00 PKR
Attempts : 3 tries before card blocks
📁 ATM-Machine/
├── 📄 atm.py ← Main program file
├── 📄 balance.txt ← Stores current balance (auto-created)
├── 📄 history.txt ← Transaction logs (auto-created)
└── 📄 README.md ← This file
| # | Topic | Used For |
|---|---|---|
| 01 | Variables & Data Types | Storing balance, PIN, attempt count |
| 02 | File Handling | Read/write balance & transaction history |
| 03 | Exception Handling | Handle missing files gracefully |
| 04 | Functions | Modular ATM operations |
| 05 | Global Variables | Share balance across functions |
| 06 | Loops | PIN retry & main menu loop |
| 07 | Conditionals | Menu routing & fund validation |
| 08 | Modules (DateTime) | Timestamp all transactions |
HaiderNeuralNet
- GitHub: @HaiderNeuralNet
- Repo: ATM-Machine
Built with ❤️ using Python