# 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.")