Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Python to build a fully functional (sans actual money) ATM machine. When the user starts the program, their current bank balance should be shown.

Use Python to build a fully functional (sans actual money) ATM machine. When the user starts the program, their current bank balance should be shown. At that point, the user must have the option to do the following:

1. Deposit Money

If the user has a balance of $0, they will be required to make a deposit of $100 or more. For any deposit thereafter, the user can enter any amount they would like, even amounts less than $1.00. Each deposit will be added to the user's total and at the end of the transaction, the current balance will be displayed to the user. The user must be given the option to enter additional deposits until they no longer want to.

2. Withdrawals

If the user has a balance of $0, they will be prohibited from making withdrawals; an error message should be shown to the user in this situation. However, they must be given the option to perform additional transactions. If the user has a balance greater than $0 and their withdrawal amount is more than the balance, they will not be able to complete the transaction but should be given as many chances as possible to enter an appropriate withdrawal amount. If the user enters a withdrawal amount less than the balance, the withdrawal amount should be subtracted from the balance and at the end of the transaction, the current balance will be displayed to the user. The user must be given the option to make additional withdrawals until they no longer want to.

3. Balance information

Once the user is shown their current balance, they must be given the option to perform additional transactions.
In addition to showing the user their current balance, display to the user what their last transaction was (deposit, withdrawal, none)

Step by Step Solution

3.47 Rating (147 Votes )

There are 3 Steps involved in it

Step: 1

Balance 0 while True printYour current balance is strBalance printWhat would you like to ... 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

Recommended Textbook for

Practical Business Statistics

Authors: Andrew Siegel

6th Edition

0123852080, 978-0123852083

More Books

Students also viewed these Accounting questions

Question

Explain the factors that determine the degree of decentralisation

Answered: 1 week ago

Question

What Is acidity?

Answered: 1 week ago

Question

Explain the principles of delegation

Answered: 1 week ago

Question

State the importance of motivation

Answered: 1 week ago

Question

Discuss the various steps involved in the process of planning

Answered: 1 week ago

Question

4. How does a sex-linked gene differ from a sex-limited genepg99

Answered: 1 week ago