Thursday
July 31, 2014

Homework Help: Computer Programming using python

Posted by Anonymous on Thursday, October 24, 2013 at 10:28am.

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 - the outstanding balance on the credit card

annualInterestRate - annual interest rate as a decimal

monthlyPaymentRate - minimum monthly payment rate as a decimal

For each month, calculate statements on the monthly payment and remaining balance, and print to screen something of the format:

Month: 1
Minimum monthly payment: 96.0
Remaining balance: 4784.0
Be sure to print out no more than two decimal digits of accuracy - so print

Remaining balance: 813.41
instead of

Remaining balance: 813.4141998135
Finally, print out the total amount paid that year and the remaining balance at the end of the year in the format:

Total paid: 96.0
Remaining balance: 4784.0
A summary of the required math is found below:

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

Note that the grading script looks for the order in which each value is printed out. We provide sample test cases below; we suggest you develop your code on your own machine, and make sure your code passes the sample test cases, before you paste it into the box below.

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 1 Test Cases

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

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Programming - Write a pseudocode program that asks the user for an integer ...
Computer Programming using python - Assume s is a string of lower case ...
computer programming - Assume that there are n tyres that could be used by car, ...
computer science python - write a program that displays all the cards in a deck ...
computer science - how do i write a program in python for an atm machine
Computer Programming using python - Assume s is a string of lower case ...
Programming - Language - PYTHON Design a program that calculates the total ...
Programming in Python - A customer in a store is purchasing five items. Design a...
Python programming Language - Assume S is a string of lower case characters. ...
computer science - I need to write a program that ask the student to enter an ...

Search
Members