Question: The following code is written in python Create a program that imitates an ATM machine. At the beginning of your program 1) Print greeting 2)

The following code is written in python

Create a program that imitates an ATM machine. At the beginning of your program

1) Print greeting

2) Store a password

3) Store a variable

4) Assign y to the start variable

It will appear as the following program

print("Welcome")

password=1234

balance=1200

start="y"

while start=="y" or start=="Y":

password1=int(input("Password entered is wrong. Please enter your password: "))

Starting from this piece of course you will write a code with an input validation.

If the password entered is not matching the password which is stored in computers memory error message will appear and it will ask user to enter the password again. If the password is correct user will given options to choose. 1 for withdraw money, 2 for deposit money, 3 to see the balance.

If the user choose option 1 ask user to enter the amount user wants to withdraw and display the amount which is requested

If the user choose option 2 ask the user to enter the amount user wants to deposit and display the amount which is deposited

If the user choose option 3 display the balance

After user is done with option selection ATM machine should ask "Do you have another transaction? Enter y for yes: "

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!