Question: Using the For.. loop, Write the program to ask the user for 7 deposits. As the user enters a deposit amount, update the balance using

Using the For.. loop, Write the program to ask the user for 7 deposits. As the user enters a deposit amount, update the balance using accumulation concept. 

Also, keep a count of the number of deposits over or equal to 1000 dollars, between 500 and 999 dollars, between 100 and 499 dollars and between 0 and 99

 

If the user enters invalid deposit amount such as negative value, display the following message. 

"You entered a wrong amount!"

 

Display the count in each of the above groups and final balance. 

 

Mimir Requirements:

The file name must be Module4Homework2.py

 

Here is the sample input and output. 

Please enter your deposit amount: 1000

Please enter your deposit amount: 800

Please enter your deposit amount: 400

Please enter your deposit amount: 200

Please enter your deposit amount: 30

Please enter your deposit amount: 4000

Please enter your deposit amount: 688

You have 2 deposit over or equal to 1000 dollars.

You have 2 deposit between 500 and 999 dollars.

You have 2 deposit between 100 and 499 dollars.

You have 1 deposit below 100 dollars.

Your balance is : 7118

 

Another Sample Input output. 

 

Please enter your deposit amount: -20

You entered a wrong amount!

Please enter your deposit amount: 2000

Please enter your deposit amount: 900

Please enter your deposit amount: 400

Please enter your deposit amount: 10

Please enter your deposit amount: 899

Please enter your deposit amount: 2000

You have 2 deposit over or equal to 1000 dollars.

You have 2 deposit between 500 and 999 dollars.

You have 1 deposit between 100 and 499 dollars.

You have 1 deposit below 100 dollars.

Your balance is : 6189



i have my code but the program seems to keep failing me automatically when i submit it. It has to be in Python 3.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Module4Homework2py Initialize variables to keep track of ... View full answer

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 Banking Questions!