Using the for loop write a program to ask the user for 7


Question: Using the For.. loop, Write a 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

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

Solution Preview :

Prepared by a verified Expert
Python Programming: Using the for loop write a program to ask the user for 7
Reference No:- TGS02805536

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)