Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Please code in Python. Thank you. Goals: Developing problem-solving skills, using loops and value returning functions Problem: You have been asked to write a program

Please code in Python. Thank you.

image text in transcribed

Goals: Developing problem-solving skills, using loops and value returning functions Problem: You have been asked to write a program that will help users estimate credit card payments and interest paid. Your program will ask the user to enter the yearly interest rate for the credit card as a percentage, then will repeatedly ask the user to re- enter the rate when the user entered a yearly interest rate less than 1% or greater than 30% Next, a loop should be employed that outputs the previous balance; calculates and outputs the monthly interest on the previous balance; asks the user to enter new charges and confirms the new charges are greater than 0 ;calculates and outputs the current balance (previous balance + monthly interest + new charges); calculates and outputs the minimum payment due; asks the user to input a payment; calculates a new current balance. The minimum payment due is the larger of 7.5% times the current balance or $10.00. If the current balance is less than $10.00, the minimum payment is the current balance. The user must make a payment greater than or equal to the minimum payment. The pavment is then subtracted from the current balance to determine the balance for the next month. This loop should continue as long as the user still owes on his/her credit card After the loop is finished, the program should output the total interest paid. Also if the user paid more than the current balance, then a credit should be output. Your program should utilize a built-in function that can round amounts to the nearest cent. This function should be called used in the loop, once to round the interest to the nearest cent and once to round the minimum payment to the nearest cent. Output of all currency amounts should be to 2 decimal places. Hint: initially set the balance from the previous month and the interest applied fronm the previous month to 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions