Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python program for a loan payment calculator Question 4: Loan Payment Calculator (6 Marks) Name your program as LastName FirstName A3Q4 py You are required

Python program for a loan payment calculator
image text in transcribed
image text in transcribed
Question 4: Loan Payment Calculator (6 Marks) Name your program as LastName FirstName A3Q4 py You are required to write a python program that will take user information such as Loan Amount, Interest Rate, Payment period and print out the payments based on the how the user would like to pay namely; weekly, bi-weekly or monthly. You need to declare following variables: . Float loanAmount: to save loan amount from the user. Float interestRate: to save interest rate applied per year basis. int loanPeriod: To save the period for which is loan has been taken. Assume it is always in years. Float paymentType: To get user to enter 1 for monthly payments, 2 for bi-weekly payments and 3 for weekly payments. Monthly payments should be default if user enters any number other than 2 or 3. . Int numberOfPeriod: This is calculated based on what selection has been made for paymentType. For monthly, bi-weekly and weekly, use 12, 52 and 26 respectively Float presentValue: to store the current loan amount due after every payment. Initial value of this will be the loanAmount. ratePerPeriod: Interest rate that is applied for each payment. This is the division of interesetRate and numberOfPeriod Float payment: use to save payment information per pay period. . Payment information can be calculated using this formula r(PV) where: P = payment PV = presentvalue r = ratePerPeriod n = nuynberOfPeriod Input: User you shouid be asked to enter loanAmount, interestRate, loanPeriod and pamentType Output: The program shou'd display payment for each period with the period number. Refer to illustration below for the format. Other requirements: . Make use of if statement to determine the paymentType user has selected and assign numberofPeriods according y Make use of for or while loop to determine the payment for each payment period *

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

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

help asp

Answered: 1 week ago

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago