python 4.2

sazo_1

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

    • 8 years ago
    • 10
    Answer(1)

    Purchase the answer to view it

    NOT RATED
    • Python4.2code.docx