Creates a mortgage object using the entered values

Assignment Help Python Programming
Reference no: EM132909984

ITECH1400 Fundamentals of Programming - Federation University

ASSIGNMENT - MORTGAGE CALCULATOR

Overview
In this assignment you will have the opportunity to test your Python skills in developing classes and using matplotlib library. Throughout the assignment you are expected to apply the principles of problem solving that we have already discussed in this course.

Learning Outcomes Assessed

Knowledge:
K1. Identify and use the correct syntax of a common programming language.
K2. Recall and use typical programming constructs to design and implement simple software solutions.
K3. Reproduce and adapt commonly used basic algorithms. K4. Explain the importance of programming style concepts (documentation, mnemonic names, indentation).

Skills:
S2. Write and implement a solution algorithm using basic programming constructs.
S3. Demonstrate debugging and testing skills whilst writing code.

Application of knowledge and skills:
A1. Develop self-reliance and judgement in adapting algorithms to diverse contexts.
A2. Design and write program solutions to identified problems using accepted design constructs.

ASSESSMENT DETAILS

Introduction. Your assignment is to write a Python program that takes inputs for the Loan Amount, Loan Term and Interest Rate and then calculates and displays values of Weekly (Fortnightly, Monthly) Repayments. Also, the program plots the values of Remaining Principal by years.

Explained below is how to calculate these values:
First, let's assume the following notations (in your program, you will input these values from the command line):
L - loan amount in AUD. Y - loan term in years. p - interest rate.
k - repayment frequency in days (i.e. weekly - 7 days, fortnightly - 14 days, monthly - 30 days).
Repayments, P0, are calculated by the following formula:

P0 =L.(1+p/365)365.y.(1+p/365)k -1/(1+p/365)365.Y -1

Remaining Principal Balance, Bn, at the end of year n is calculated by the formula:

Bn =L.(1+p/365)365.n -P0.(1+p/365)365.n -1/(1+p/365)k -1

1. Develop a Mortgage class.

The class should have the following attributes (instance variables):
loan - for the loan amount in AUD. years - loan term in years. interest - interest rate.
r_frequency - repayment frequency in days.
These attributes should be defined in the constructor, __init_. Also, the class should define the following methods:

repayments(self) - calculates the value of repayments using the formula provided in the introduction (for P0) and returns the calculated value.

balance_after(self,n) - calculates the remaining balance (debt) after n years using the formula provided in the introduction (for Bn) and returns the calculated value.

print(self) - prints information about the mortgage on screen, i.e.: loan amount, loan term, interest and repayments. The output of this method should be similar to the following:

Loan Amount: 100000.0 AUD Loan Term (Years): 20 Interest: 4.8%
Fortnightly Repayments: 298.61

draw_balance_graph(self) - using the matplotlib library, the method plots a graph of the Remaining Balances by years using balance_after method. The output of this method should be similar to the following:

Task 2. Write main() function.

This should be your main program that:

1. Prompts and takes inputs for the loan amount, loan term, interest rate and repayment frequency.
2. Creates a Mortgage object using the entered values.
3. Using the Mortgage object's methods, prints the mortgage information on screen and plots the mortgage balances by years.

You are required to use exception handling to make your inputs robust (foolproof) i.e. if the user will enter a wrong value, the program won't crash, but instead it will prompt the user to enter a correct value.

Attachment:- Mortgage_Calculator.rar

Reference no: EM132909984

Questions Cloud

What is the identity of the organization : What is the identity of the organization? How much will the program or project cost during the grant time period? How much is being requested from the funder?
Identify employer rights and employee rights : 1. Identify three employer rights and three employee rights and an example of policies and procedures that apply to each right.
How are your emotions impacting your decision-making : How are your emotions impacting your decision-making? Provide specific examples of how your emotions triggered you to make a mistake or to make a good decision?
How can enhancing creativity help with stress mitigation : How can enhancing creativity help with stress mitigation? Extend the relationships between stress mitigation and creativity development practices.
Creates a mortgage object using the entered values : Creates a Mortgage object using the entered values and Identify and use the correct syntax of a common programming language
Prepare all necessary journal entries : Question - On Jan 1, 2021, Epistemology Inc. granted 500,000 options to its executive team. Prepare ALL necessary journal entries
How a constitutional case is decided by the supreme court : How a constitutional case is decided by the Supreme Court. Include how the Supreme Court accepts a case, how the day of oral arguments progresses
What economists mean by the economic problem : A description of what economists mean by the 'economic problem'. In relation to the private organisation APPLE with examples
What is the project IRR and NPV : Question - Los Angeles Lumber Company is considering a project with a cost of $1,000 initially, What is the project IRR and NPV

Reviews

len2909984

6/7/2021 11:18:41 PM

Please do it carefully follow each and every instruction Very Strictly follow marking Criteria

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd