Create a program that calculates the monthly payments on a loan using Decimal & LC Console SEE Sanple Run Attached Specifications  The interest rate should only use 1 decimal place for both the calculation and the formatted results.  The formula for calculating the monthly payment is: monthly_payment = loan_amount * monthly_interest_rate / (1 - 1 / pow( (1 + monthly_interest_rate), months))  Assume that the user will enter valid data.

Answers

Answer 1

Answer:

Consider the following code.

Explanation:

Code:

Unix Terminal> cat loan_calc.py

#!/usr/local/bin/python3

import locale

from decimal import *

def main():

locale.setlocale(locale.LC_ALL, 'en_US')

print('Monthly Payment Calculator')

while True:

print('DATA ENTRY')

loan_amt = input('Loan amount: ')

loan_amt = float(loan_amt)

int_rate = input('Yearly interest rate: ')

int_rate = float(int_rate)

years = input('Years: ')

years = int(years)

mon_rate = int_rate / 12 / 100

months = years * 12

monthly_pay = loan_amt * mon_rate / ( 1 - 1/(1 + mon_rate) ** months)

monthly_pay = Decimal(monthly_pay).quantize(Decimal('.01'), rounding=ROUND_DOWN)

print()

print('FORMATTED RESULT')

print('Loan amount: %30s' %locale.currency(loan_amt))

print('Yearly interest rate: %20.2f' %int_rate + '%')

print('Number of years: %25d' %years)

print('Montly payment: %25s' %locale.currency(monthly_pay))

print()

print('Continue? (y/n): ')

choice = input().strip()

if choice.lower() == 'n':

break

if __name__=='__main__':

main()

Unix Terminal>

Code output screenshot:

Create A Program That Calculates The Monthly Payments On A Loan Using Decimal & LC Console SEE Sanple

Related Questions

A student wants to restate some ideas she found in a journal article by a prominent expert in economics. She combines her own words with some of the expert's words, which she does not put in quotation marks. She references the article at the end her work. This is:

Answers

Explanation:

Althought she referenced the article at the end, is imposible to know which part of the article is hers and which part is the expert's so that would be plagiarism.

If she used quotation marks in the words of the expert it would be clear and no plagiarism could be accused.

Final answer:

The scenario describes plagiarism, which occurs when one uses someone else's work or ideas without proper citation. Even though the student referenced the source at the end, not using quotation marks for direct quotes is considered plagiarism.

Explanation:

The scenario mentioned describes plagiarism. Plagiarism is a serious academic offense that occurs when one represents someone else's ideas, words, or work as their own without acknowledging the original source. In this case, the student has used the expert's words and ideas without proper citation (because she did not use quotation marks to indicate the direct quotes).

Although she mentioned the source at the end of her work, failing to use quotation marks for direct quotes is still considered plagiarism. To avoid this, it is essential to use quotation marks when directly quoting from a source and to paraphrase correctly when you are conveying the same idea in your own words.

Learn more about Plagiarism here:

https://brainly.com/question/27007189

#SPJ3

Although Larry never went out for any sport at his high school, he could be seen in the stands of every game wearing the school’s colors and cheering wildly for his team. When they won, he felt exhilarated and would tell people, "We won! I knew we could do it," as if he had played the whole game himself. Larry is exhibiting which defense mechanism?

Answers

Larry is exhibiting the defense mechanism known as Identification

Identification is a defense mechanism where an individual unconsciously takes on the characteristics, feelings, or behaviors of another person or group that they admire or identify with. In this case, Larry, who did not participate in sports himself, identifies closely with his school's sports teams.

By wearing the school's colors, cheering for the team, and feeling exhilarated when they win, Larry is psychologically aligning himself with the team and deriving a sense of belonging and accomplishment from their success, as if it were his own. This behavior allows Larry to cope with any feelings of inadequacy or unfulfilled desires he may have regarding his own athletic abilities.

Other Questions
Given: ABC is a right triangle. AC = 20 BC = 5 Determine the length of the missing side of ABC. When applicable, simplify radicals and show all of your work. The practice of evaluating another culture according to the standards to one's own culture is known_________. What are some of the safety concerns in a darkroom? What are some ways that you can reduce these risks? Do teachers find their work rewarding and satisfying? An article reports the results of a survey of 397 elementary school teachers and 268 high school teachers. Of the elementary school teachers, 226 said they were very satisfied with their jobs, whereas 129 of the high school teachers were very satisfied with their work. Estimate the difference between the proportion of all elementary school teachers who are satisfied and all high school teachers who are satisfied by calculating a 95% CI. (Use pelementary phigh school. Round your answers to four decimal places.) Pia uses 6 cups of sugar to make 8 pies At that rate , how much sugar will it take to make 12 pies CAN SOMEONE PLEASE HELP ME Hypnotically ""refreshed"" memories may prove inaccurateespecially if the hypnotist asks leading questionsbecause of:_____________ Budgeting software is often designed as a component of the company's Enterprise Resource Planning (ERP) system. a. trueb. false A 2.0 kg block is held at rest against a spring with a force constant k = 264 N/m. The spring is compressed a certain distance and then the block is released. When the block is released, it slides across a surface that has no friction except for a 10.0 cm section that has a coefficient of friction k = 0.54. Find the distance in centimeters the spring was compressed such that the block's speed after crossing the rough area is 2.7 m/s. In a combustion reaction, 46.0 of ethanol reacts with 96.0 of oxygen to produce water and carbon dioxide. If 54.0g of water is produced, how much carbon dioxide is produced? Please Help!! I'm soo confused.A line contains the points (-30, 42) and (-27, -30) what is the slope of the line in simplest form?if you need any other information let me know!!:)) company looks at its expenses and finds that its payments to freelancers increased significantly over the past few months, exceeding the budget by 25 percent. This is an example of ________.(A) using a budget for planning(B) using data to confirm a budget (C) justifying expenses with a budget(D) using a budget for monitoring and controlling what is 1000 times 0.072 I need help HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! A method of infection control where all human blood and potentially infectious materials are handled is called:_________ If we were conducting an experiment on the effect knowledge has on categorization, we might compare the results of expert and non-expert groups. Suppose we compare horticulturalists to people with little knowledge about plants. If we asked the groups to name, as specifically as possible, five different plants seen around campus, we would predict that the expert group would primarily label plants on the _____ level, while the non-expert group would primarily label plants on the _____ level. Which sentence is punctuated correctly?The aliens suffered from exhaustion, after traveling several light years.They needed some relaxation, when they finally landed their spaceship.After they rested a few days, the aliens revived sufficiently to explore.They needed all their energy, once they started hiking the rough terrain Liam Company signed a lease for an offi ce building for a period of 12 years. Under the lease agreement, a security deposit of $9,600 is made. The deposit will be returned at the expiration of the lease with interest compounded at 4% per year. What amount will Liam receive at the time the lease expires?Amount at the time the lease expires ___ $. Residents of poor countries tend to have higher rates of infant mortality because:_______ Through which of the following ays does someone communicate a mood orthe importance of a statement? Steam Workshop Downloader