Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

ATM_MACHINE_OPERATION

This program simulates a simple ATM system using Python.

First, the user creates an ATM PIN. The account balance is initialized to ₹5000. After the PIN is created successfully, the program enters an infinite loop using while True, meaning it will keep running until the user chooses to exit.

Inside the loop, the user is asked to enter their PIN. If the entered PIN matches the created PIN, the ATM menu is displayed with four options:

Balance Enquiry

Deposit Money

Withdraw Money

Exit

The user selects an option by entering a number.

If the user chooses 1, the program displays the current balance.

If the user chooses 2, they are asked to enter a deposit amount. That amount is added to the existing balance, and a success message is shown.

If the user chooses 3, they are asked to enter the withdrawal amount. The program checks whether the withdrawal amount is less than or equal to the available balance. If sufficient funds are available, the amount is deducted and a success message is displayed. If not, it shows “Not enough balance.”

If the user chooses 4, the program prints a thank-you message and exits the loop using break, which stops the program.

If the user enters an invalid menu option, the program displays “Invalid option.”

If the entered PIN does not match the created PIN, the program displays “Wrong PIN. Try again.” and returns to the beginning of the loop.

Overall, this program demonstrates the use of variables, conditional statements (if-elif-else), loops, and basic input/output operations to create a simple ATM simulation.

About

This program simulates a simple ATM. The user creates a PIN and starts with a balance of ₹5000. After entering the correct PIN, a menu allows balance enquiry, deposit, withdrawal, or exit. Deposits add money, withdrawals deduct if sufficient funds are available. The program repeats until the user exits.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages