Develop a simple Python program that asks for input, does arithmetic, and provides output.
You and many of your friends will be buying cars and homes within the next few years. As a result you have decided to write a Python program to calculate the principal payments and help everyone realize exactly how much interest they will pay over the period of their loans. In order to perform the appropriate calculations, you will need to know the initial loan amount (“principal”), the number of months of the loan (“months”), and the interest rate (“interest”). Your program should calculate the principal payment for each month, the amount paid over the life of the loan, and the total interest paid.
The formulas you will need are:
rate = interest / 1200
principal (rate ((1+rate)months)
monthly payment = ——————————
(1+rate)months – 1
Note: have the user input the interest rate as it appears before dividing it by 100. For example, if the interest rate is 5.3% the user should enter 5.3 NOT .053.
Save your program as usury.py.
You may be wondering if there are any Express II classes that sound enjoyable as you contemplate dropping CSCI220. Don’t leave yet! While the problem may seem difficult, applying the software development cycle will help. Ask yourself, and write the answers to, the following questions. Add your answers as a comment to your .py file.
What will the program do? (Purpose statement)
What will be the inputs and outputs? (Part of header.)
Provide a step-by-step list of what your program must do, aka an algorithm. (Remember this is in English! Add these to body of your code as comments for the code.)
Implement your code.
Test your program using the sample runs below.
Principal/ Loan Amount
Monthly Payment (calculated)
Total amount paid (calculated)
Total interest paid (calculated)
File to be submitted:
The policies expressed in Policy.doc will be in place for this and all future assignments.