Question: PYTHON: You are considering buying a new car that costs $45,000. Use a nested for loop to calculate (and print) the monthly car payments associated
PYTHON:
You are considering buying a new car that costs $45,000. Use a nested for loop to calculate (and print) the monthly car payments associated with three different loan lengths (48, 72, 120 months) and three different annual percentage rates (5%, 8%, 12%). (Nine options in total.) You have $15,000 down payment already.
The output should be nine sentences of the form:
When the APR is X% and the number of months is Y, the monthly payment is $Z.
- Hint 1: In this question, you can approximate monthly rate (%) with annual rate / 12.
- Hint 2: As in Question 2, if you use {:7.2f} instead of {}, your monthly payment will only display two decimal places. For this question, you may want to use {:6.2f} to eliminate the space between the dollar sign and the amount
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
