Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Activity: ATM System ( 3 0 points ) A typical ATM machine will allow a bank customer to perform the following tasks ( assume the

Activity: ATM System (30 points)
A typical ATM machine will allow a bank customer to perform the following tasks (assume the initial balance is set to $1000): withdraw, deposit and balance inquiry. The ATM System should have the following:
Display Welcome Greetings ("Welcome to ABC Bank ATM")
Display Menu to indicate transaction types-balance inquiry, withdraw, deposit.
"0 for exit"
"1 for withdraw"
"2 for deposit"
"3 for balance inquiry"
Execute balance inquiry by displaying the current balance.
Execute withdraw by asking the user for amount to withdraw and display balance after withdrawal. Display INSUFFICIENT FUNDS if the user entered an amount larger than the balance.
Execute deposit by asking the user the amount to deposit and display balance after the deposit.
A function to simulate ATM system.
The initial customer balance is set at $1000.
Complete the following tasks.
Task #1(1 point)
Define a global variable and have it reference 1000.
Task #2(2 points)
Write a function (name it welcome_message) to display welcome greetings.
Task #3(2 points)
Write a function (name it menu_message) to display the menu shown above.
Task #4(5 points)
Write a function (name it withdraw) that will prompt the user to enter the amount to withdraw (assign to variable amt). The function will reduce balance by the amount entered if the balance is greater than or equal to the amount entered or display "Insufficient Funds!" otherwise.
Task #5(5 points)
Write a function (name it deposit) that will prompt the user to enter the amount to deposit (assign to variable amt). The function will increase the balance by the amount entered.
Task #6(3 points)
Write a function (name it balance_inquiry) that will display balance using 2 decimals places.
Task #7(10 points)
Write a function (name it simulate_atm). The function will call the welcome_message. The function uses a while loop to allow the ATM user to perform several transactions (deposit, withdraw or balance inquiry) until the user is ready to exit.
Task #8(2 points)
Use the if statement involving __name__=='__main__' to call the simulate_atm.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions