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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started