Question: Please use python Problem 2 (33 points): Remember the mortgage calculator from Assignment 4? Lets do another one, but this time allowing free form text
Problem 2 (33 points): Remember the mortgage calculator from Assignment 4? Lets do another one, but this time allowing free form text from the user. You will have to be more careful with validation on this version. Develop a GUI named MortgageCalculator that can be used to calculate the monthly payment of a mortgage. The mortgage monthly payment can be calculated as follows: o P Principal (the amount of the loan) as a decimal o N Term of Loan (how many years to pay off the loan) as an int. o R The interest rate on the loan as a decimal. o The values will be used to compute the following formula: p r/1200o -(1.0 /1200.0) Test your calculation/output here: https://www.easycalculation.com/mortgage/loan-payment- amount.php This is the default view. You need to use grid0 for layout. The layout consists of 3 labels, 3 entry text boxes and 1 button. For example. When calculating the mortgage for the following values: Term in Years 30 A popup shows the result. Notice formatting! I will be taking 10 points off for incorrect format! The values should be treated as floatO OK Principal Term in Years 30 They are warned that an incorrect value was entered for principal. OK This applies to Interest and Terms as well Interest Rate d Term in Years 30 OK What can happen if the users all 0s? Divide by Zero! All errors should be caught Mortgage calculatorOx Interest Rate 0 Term in Years d Monthly Payment Error. Unable to calculate payment OK You will run the program using MortgageCalculatorO.mainloopo The constructor has been written for you and can be found in the template file uploaded to D21. Do not change these methods. Instead you must fill in all the methods
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
