Skip to content

Latest commit

 

History

76 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🏧 ATM Simulator (Python)

A console-based ATM simulator written in Python using core programming concepts: functions, loops, conditionals, input validation, and in-memory data handling.

📘 Project Overview

This program simulates a realistic ATM system for registered bank account holders. Each user can securely log in using their account number and PIN, perform multiple banking operations, and receive a detailed receipt at the end of the session.

All account data is stored in Python lists and dictionaries during runtime. No files, databases, or external libraries are used.

🧰 Technologies Used

  • Python (functions, loops, conditionals)
  • Lists and dictionaries for account storage
  • Input validation using string methods
  • No external libraries required

📂 Program Execution Flow

  1. Main menu is displayed with options to:
    • Perform an ATM operation
    • Exit the program
  2. User enters an account number to log in.
  3. The system searches for the account in stored records.
  4. User enters PIN with a maximum of three attempts.
  5. On successful authentication, the ATM menu is displayed.
  6. All transactions are tracked during the session.
  7. A receipt is generated before exiting the session.

🔐 Login & PIN System

  • Login requires a valid account number and PIN.
  • PIN must contain only digits.
  • Maximum of three incorrect attempts allowed.
  • Account access is denied after exceeding attempts.

👤 Registered User Accounts

The system maintains predefined bank accounts in memory:

accounts = [
  {
    "name": "Ahmed",
    "account_no": "49217385",
    "pin": "1234",
    "balance": 12000,
    "initial_balance": 12000
  },
  ...
]
  • Accounts are searched by account number.
  • PINs are stored as strings for validation consistency.
  • Each account tracks its initial balance for receipt generation.

📋 ATM Menu Options

Once logged in, the account holder can:

  1. View Balance
  2. Deposit Money
  3. Withdraw Money
  4. Pay Utility Bills
  5. Change ATM PIN
  6. Exit Session

💰 Banking Features

  • Balance Inquiry: Displays current balance and logs the action.
  • Deposit: Allows only positive numeric amounts.
  • Withdrawal: Prevents overdrawing the account.
  • Utility Bill Payments:
    • Electricity
    • Gas
    • Water
    • Internet / WiFi
    • Telephone / Mobile
  • PIN Change: Requires old PIN verification and confirmation.

🧾 Transaction Receipt

At the end of each session, a receipt is automatically generated showing:

  • Account holder name
  • Starting balance
  • Closing balance
  • Complete transaction history

If no actions were performed, the receipt clearly indicates this.

🧠 Learning Objectives

  • Design menu-driven console applications.
  • Implement secure authentication logic.
  • Track and manage session-based state.
  • Apply input validation and error handling.
  • Simulate real-world ATM workflows using Python.

✨ Thank You for Visiting! ✨

Feel free to explore, refactor, and extend this ATM simulator to enhance your Python programming skills.

About

ATM Simulator in Python – A menu-driven banking system using only functions, loops, conditionals, lists, and dictionaries. Supports registered users with deposit, withdrawal, PIN change, and bill payment, plus temporary guest users with session-based balances. Ideal for academic learning and secure PIN validation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages