Computer Programming using python

posted by .

Now write a program that calculates the minimum fixed monthly payment needed in order pay off a credit card balance within 12 months. By a fixed monthly payment, we mean a single number which does not change each month, but instead is a constant amount that will be paid each month.

In this problem, we will not be dealing with a minimum monthly payment rate.

The following variables contain values as described below:

balance - the outstanding balance on the credit card

annualInterestRate - annual interest rate as a decimal

The program should print out one line: the lowest monthly payment that will pay off all debt in under 1 year, for example:

Lowest Payment: 180
Assume that the interest is compounded monthly according to the balance at the end of the month (after the payment for that month is made). The monthly payment must be a multiple of $10 and is the same for all months. Notice that it is possible for the balance to become negative using this payment scheme, which is okay. A summary of the required math is found below:

Monthly interest rate = (Annual interest rate) / 12.0
Monthly unpaid balance = (Previous balance) - (Minimum monthly payment)
Updated balance each month = (Monthly unpaid balance) + (Monthly interest rate x Monthly unpaid balance)

Test Cases to Test Your Code With. Be sure to test these on your own machine - and that you get the same output! - before running your code on this webpage!
Click to See Problem 2 Test Cases

The code you paste into the following box should not specify the values for the variables balance or annualInterestRate - our test code will define those values before testing your submission.

  • Computer Programming using python -

    #include <stdio.h>
    #include <math.h>
    int main()
    {
    float balance; //Número
    float epsilon = 0.001; //Exactitud buscada
    float AIR;//annual Interest rate
    float MMP=10;//minimum montly payment
    float mub;//montly unpaid balance
    float mir;// montly interest rate
    int i=1;

    /*printf("Balance: ");scanf("%d",&balance);//pedimos el balance
    printf("Annual Interest Rate: "); scanf("%d",&AIR); //pedimos el annual interest rate

    while ((MMP*12)-balance>=epsilon && (MMP*12)<=balance)
    {
    while(i<12)
    {
    mir=AIR/12.0;// sacamos el montly interest rate
    mub=balance-MMP;//el balance disminuye conforme lo que se paga
    balance= mub + (mir*mub);//cambiamos el valor del balance al sumarle interes
    i+=1;//aumentamos el contador a 1
    }
    MMP+=10;
    }*/

    printf("Lowest payment %f", MMP);

    return 0;
    }

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. finance

    You have credit card debt of $25,000 that has an APR (monthly compounding) of 15%. Each month you pay minimum monthly payment only. You are required to pay only the outstanding interest. You have received an offer in the mail for an …
  2. Math

    The outstanding balance on Bill's credit card account is 3690 dollars. The bank issuing the credit card is charging 21 percent of interest per year compounded monthly. If Bill decides to pay off his balance in equal monthly installments …
  3. Computer Programming using python

    Write a program to calculate the credit card balance after one year if a person only pays the minimum monthly payment required by the credit card company each month. The following variables contain values as described below: balance …
  4. Computer Programming using python

    Write a program to calculate the credit card balance after one year if a person only pays the minimum monthly payment required by the credit card company each month. The following variables contain values as described below: balance …
  5. Computer Programming using python

    Now write a program that calculates the minimum fixed monthly payment needed in order pay off a credit card balance within 12 months. By a fixed monthly payment, we mean a single number which does not change each month, but instead …
  6. computer programming

    Paying Off Credit Card Debt Each month, a credit card statement will come with the option for you to pay a minimum amount of your charge, usually 2% of the balance due. However, the credit card company earns money by charging interest …
  7. computer programming

    Paying Off Credit Card Debt Each month, a credit card statement will come with the option for you to pay a minimum amount of your charge, usually 2% of the balance due. However, the credit card company earns money by charging interest …
  8. Computer science

    Paying Off Credit Card Debt Each month, a credit card statement will come with the option for you to pay a minimum amount of your charge, usually 2% of the balance due. However, the credit card company earns money by charging interest …
  9. linear algebra

    The outstanding balance on Peter's credit card account is 4730 dollars. The bank issuing the credit card is charging 19.3 percent of interest per year compounded monthly. If Peter decides to pay off his balance in equal monthly installments …
  10. College Algebra

    You have a credit card with a balance of $3000. Each month the minimum payment is 2.5% of the balance. The monthly interest rate is 1.5% of the balance. You decide you would like to pay off this card by making the minimum payment each …

More Similar Questions