Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in python code please Task 4: Student Loan Calculator Again Next you're going to modify your Student Loan Repayment Calculator program to use functions As

image text in transcribed

in python code please

Task 4: Student Loan Calculator Again Next you're going to modify your Student Loan Repayment Calculator program to use functions As a reminder, the equation for a monthly payment is given by: P(i/12) 1- (1 i/12)-n where p is the monthly payment, P is the loan amount, is the annual percent interest rate (must be a fraction in the program), and n is the number of monthly payments. Write a program to calculate the monthly amount you owe, the total amount you'll end up paying, and the total amount of interest you'll have paid. The program must include the following . Global variables for the interest rate (a float), number of monthly payments (an integer), and amount of loan principal (P, a float) . A function calc.monthly-pymt () that calculates your monthly payment To print the dollar amounts, use string formatting rather than truncating the amounts as integers For example, ! >>> iou 25 * 22 >> iou 3 78.57142857142857 4 >>> print(, I owe you $%0.2f., % iou) s I owe you $78.57. Here's an example of my output i Enter the amount you owe [no commas]30000 2 Enter the interest rate [%]: 6.8 3 Enter the number of years you want to spend to pay back your loan: 10 s Your monthly payment is $345.24 6 The total amount you ended up paying is $41428.92 7 The total amount of interest you paid is $11428.92

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

Students also viewed these Databases questions

Question

5. What are the other economic side effects of accidents?

Answered: 1 week ago