Question: ( PYTHON ) Lab 3 A: Credit Cards. Financial advisors will almost always tell you that you should pay for things in cash and avoid
PYTHON LabA: Credit Cards. Financial advisors will almost always tell you that you should pay for things in cash and avoid credit card debt. Further, they tell you that you should have a small emergency fund that you keep stocked for emergencies like flat tires, dead refrigerators and so on However, life doesnt always work that way and sometimes we need to charge things to our credit cards. So for this part of the lab, were going to write a calculator that calculates your minimum monthly payment on your card.
To create this calculator, we will ask the user for the current balance on their credit card and the APR Annual Percentage Rate of the card. To calculate the minimum payment, you will multiply the current balance on the credit card also called the amount owed times APR and divide this number by since there are months in a year. The formula is:
Amount Owed times APR : Minimum Payment.
The input APR is a percentage, so be sure to divide it by when calculating the minimum payment. The Monthly Percentage Rate is calculated by dividing the APR by since there are months in a year. When printing the monthly percentage rate and the minimum payment, make sure to round them to and decimal places, respectively. You can round any float by putting it inside round:
printround #prints PI rounded to two decimal places
Below are two example runs. The user input is in bold notice the dollar sign is not part of the user input
Sample run : Amount owed: $ APR: Monthly percentage rate: Minimum payment: $
Sample run : Amount owed: $ APR: Monthly percentage rate: Minimum payment: $
I am needing to code this in Python. Here is my solution so far:
owed floatinputAmount owed: $
APR floatinputAPR:
APRpercentage APR
monthlyAPR APRpercentage
minpayment owedAPRpercentage
roundedmonthlypercentage roundmonthlyAPR,
roundedminpayment roundminpayment,
printMonthly percentage rate: strroundedmonthlypercentage
printMinimum payment: $ strroundedminpayment
I can get the minimum payment calculator correct, but I can't seem to get correct the Monthly Percetage Rate. What am I missing or doing incorrectly for that?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
