Python ATM Machine Simulator | Beginner Project to Learn Loops & Conditionals

🏧 Build a Simple ATM Machine Simulator in Python — Step-by-Step Guide

Are you looking for a beginner-friendly Python project that helps you learn loops, conditional statements, and user input handling? Then you’ll love building this Simple ATM Machine Simulator in Python.

In this project, we’ll create a console-based ATM system that allows the user to log in, deposit money, withdraw funds, and check their balance — just like a real ATM! This is a perfect project for students and Python learners who want to apply the core programming concepts in a fun way.


🔹 What You’ll Learn

  • Understand variables, conditionals, and loops in Python.
  • Learn to handle user authentication using basic login credentials.
  • Simulate real-life ATM features like withdrawal and deposit.
  • Improve your problem-solving and coding logic.

🧠 Project Overview

In this project, we’ll simulate the following ATM operations:

  1. User Login: The user must enter a correct PIN to access their account.
  2. Check Balance: Displays the current account balance.
  3. Deposit Money: Adds entered amount to the balance.
  4. Withdraw Money: Deducts amount if the balance is sufficient.
  5. Exit: Ends the session with a thank-you message.

This project works completely in the Python terminal — no external libraries required.


💻 Python Code for ATM Simulator



# Simple ATM Machine Simulator

print("===== Welcome to Python ATM Simulator =====")

# Default credentials

pin = "1234"

balance = 1000.0

# Login Section

user_pin = input("Enter your 4-digit PIN: ")

if user_pin == pin:

    while True:

        print("\n1. Check Balance")

        print("2. Deposit Money")

        print("3. Withdraw Money")

        print("4. Exit")

        choice = input("\nEnter your choice: ")

        if choice == "1":

            print(f"\nYour current balance is: ${balance:.2f}")

        elif choice == "2":

            amount = float(input("\nEnter amount to deposit: $"))

            balance += amount

            print(f"\n${amount:.2f} deposited successfully! New balance: ${balance:.2f}")

        elif choice == "3":

            amount = float(input("\nEnter amount to withdraw: $"))

            if amount <= balance:

                balance -= amount

                print(f"\nWithdrawn ${amount:.2f}. Remaining balance: ${balance:.2f}")

            else:

                print("\nInsufficient balance!")

        elif choice == "4":

            print("\nThank you for using Python ATM! Goodbye!")

            break

        else:

            print("\nInvalid option! Please try again.")

else:

    print("\nIncorrect PIN! Access Denied.")


🚀 How It Works

  • The program starts by welcoming the user and asking for a 4-digit PIN.
  • If the entered PIN matches, the user can choose any action from the menu.
  • The code uses loops and conditional statements to repeat the menu until exit.
  • Each transaction updates the balance accordingly.

🌟 Why This Project is Important

This mini project helps beginners:

  • Practice decision-making using if-else statements.
  • Learn to create interactive programs that respond to user input.
  • Build a foundation for future GUI or database-connected ATM apps.

🎥 Watch the Full Video Tutorial

👉 Read the full article here: DomeBytes ATM Project Page


🎵 Music Credit

Track: LXNGVX, Warriyo - Mortals Funk Remix
Music provided by NoCopyrightSounds.
🎧 Watch on YouTube | 💾 Free Download / Stream


🏁 Final Thoughts

That’s it! You’ve just built your own Python ATM Machine Simulator. This simple console app strengthens your Python basics and boosts your confidence for more advanced projects.

If you found this helpful, subscribe to DomeBytes on YouTube and explore more Python tutorials, tips, and coding projects!


💡 Got a question or feedback about this post? Drop your comment below! We review all messages before publishing to keep the discussion clean and useful.

Previous Post Next Post

Total Pageviews

Search here..