Free

ATM Simulation System

A working cash machine in Python and MySQL — balance, withdrawal, deposit and a transaction history.

  • Python
  • MySQL
  • mysql-connector

About this project

A menu-driven cash machine: check a balance, withdraw, deposit, change a PIN, and print a mini statement. Every action writes to a transaction table, so the balance is always explainable rather than just a number that changed.

The reason this is a better first database project than it looks is that money is unforgiving. A withdrawal has to debit the account AND write the transaction, and if the program dies between the two the account is wrong forever. So the withdrawal runs in a transaction and commits once. That single idea — that some operations must happen completely or not at all — is the thing worth taking away.

What you will learn

  • Connect a Python program to MySQL and run queries safely with parameters
  • Model money correctly — why a balance is never stored as a floating-point number
  • Write a withdrawal so a crash halfway through cannot lose or duplicate money
  • Keep an append-only transaction log and reconcile a balance from it
  • Lock an account after repeated wrong PINs, and hash the PIN rather than storing it

Before you start

  • Python basics — variables, loops, functions
  • A little SQL: SELECT, INSERT, UPDATE
  • MySQL installed locally, or access to any MySQL server

New to Python? The free Python course covers everything this project assumes.

Academic integrity notice

These projects are provided for learning, experimentation and reference. Understand the code, modify it for your own requirements, and acknowledge external work according to your institution’s academic policies. Priodemy does not supply work to be submitted as your own.