Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please use python and please follow the instructions 100% Instructions: Read Chapter 10 on Classes. Following the instructions below to create a python program. 1)

image text in transcribed

please use python and please follow the instructions 100%

Instructions: Read Chapter 10 on Classes. Following the instructions below to create a python program. 1) In this program, you are required to define a Loan class in one python module. Define the data attributes, constructor (using 100000, 5, and 10 as the default values for loan_amount, annual_rate, and year), and methods according to the following UML description. Thestr..0 method should summarize all the attributes of the class. Note: Even though monthly payment is calculated based on the monthly interest rate, a loan term is usually defined by an annual interest rate. The formula for the monthly payment of a loan is given by loanAmountx monthlylnterestRate Yes, it is the same as you monthlyPaynent- did in team activity 1 so (1+monthlyInterestRate) InterestRate2 may want to referen to what you did in team activity 1. 2) In a separate python file, define and call the main function. Requirements for the main0: a) ask user to enter a loan amount, annual interest rate, and duration of the loan in years; b) create an instance of the Loan class based on the inputs from the user; c) call the monthly_payment and total_payment methods to figure out the monthly and total payments of the loan; d) use a print statement to display the loan info, including the monthly and total payments. Loan __loan amount annual rate --year __init__(loan amount, annual rate, year) monthly-payment0 total_payment0 get_loan amount0 set loan amount(loan amount) get annual rate0 set annual_rate(annual_rate) get year set year(year) str .O Fix any syntax errors and test your code if you can. Submit both python files through Canvas for grading

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

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions