0% found this document useful (0 votes)
3 views2 pages

ATM Machine Simulation Using Python

This document outlines a simple ATM machine simulation implemented in Python. It allows users to check their balance, deposit money, and withdraw funds after entering a correct 4-digit PIN. The program includes error handling for invalid inputs and insufficient funds.

Uploaded by

Shanthana.k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

ATM Machine Simulation Using Python

This document outlines a simple ATM machine simulation implemented in Python. It allows users to check their balance, deposit money, and withdraw funds after entering a correct 4-digit PIN. The program includes error handling for invalid inputs and insufficient funds.

Uploaded by

Shanthana.k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 2

# ATM Machine Simulation using Python

# Initial account balance and PIN


balance = 10000
pin = 1234

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


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

if entered_pin == pin:
while True:
print("\n--- Main Menu ---")
print("1. Balance Inquiry")
print("2. Deposit")
print("3. Withdraw")
print("4. Exit")

choice = int(input("Select an option (1-4): "))

if choice == 1:
print(f"Your current balance is: ₹{balance}")

elif choice == 2:
deposit = float(input("Enter amount to deposit: ₹"))
if deposit > 0:
balance += deposit
print(f"₹{deposit} deposited successfully. New balance: ₹{balance}")
else:
print("Enter a valid amount!")

elif choice == 3:
withdraw = float(input("Enter amount to withdraw: ₹"))
if 0 < withdraw <= balance:
balance -= withdraw
print(f"₹{withdraw} withdrawn successfully. Remaining balance:
₹{balance}")
else:
print("Insufficient balance or invalid amount!")

elif choice == 4:
print("Thank you for using Python ATM. Goodbye!")
break

else:
print("Invalid choice! Please select between 1 and 4.")
else:
print("❌ Incorrect PIN. Access Denied.")

You might also like