1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
elena55 [62]
3 years ago
14

Create a program that calculates the monthly payments on a loan using Decimal & LC Console SEE Sanple Run Attached Specifica

tions  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.

Engineering
1 answer:
diamong [38]3 years ago
5 0

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:

You might be interested in
Ignoring any losses, estimate how much energy (in units of Btu) is required to raise the temperature of water in a 90-gallon hot
Rudik [331]

Answer:

Q=36444.11 Btu

Explanation:

Given that

Initial temperature = 60° F

Final temperature = 110° F

Specific heat of water = 0.999 Btu/lbm.R

Volume of water = 90 gallon

Mass = Volume x density

1\ gallon = 0.13ft^3

Mass ,m= 90 x 0.13 x 62.36 lbm

m=729.62 lbm

We know that sensible heat given as

Q= m Cp ΔT

Now by putting the values

Q= 729.62 x 0.999 x (110-60) Btu

Q=36444.11 Btu

5 0
2 years ago
Of the cost reduction strategies for workers' compensation mentioned in the required readings, which one do you think would work
Vesnalui [34]

In industries together with production, we want people to address the manufacturing of merchandise and the usage of heavy machinery.

<h3>What is the painting situation?</h3>

In such painting situations, people are at risk of injuries, and this prices the maximum for the company. So so that you can put into effect value discount is such conditions we want to have right coincidence cowl plans for the people and make sure all of the protection precautions are taken withinside the factory.

  1. The people have to be properly educated on using protection measures and in case any injuries arise we have to have coverage claims in order that we not want to make investments extra cash and we also can offer protection and protection to the people.
  2. This approach is excellent for this enterprise due to the fact regardless of what number of precautions we take people are uncovered to fitness risks and as a result having the right coverage insurance is a superb value discount strategy.

Read more bout the compensation :

brainly.com/question/25273589

#SPJ1

3 0
1 year ago
1. An air standard cycle is executed within a closed piston-cylinder system and consists of three processes as follows:1-2 = con
QveST [7]

Answer:

Explanation: Here it is: 67 Hope that helps! :)

5 0
3 years ago
What are the general rules for press fit allowances
Keith_Richards [23]

Explanation:

As a general rule of thumb, the large the diameter of a bearing, bushing or pin, the larger the tolerance range,” Brieschke points out. “The inverse is true for smaller-diameter pieces.”

Mike Brieschke, vice president of sales at Aries Engineering, says a 0.25-inch-diameter metal dowel that is press-fit into a mild steel hole usually has an interference of ±0.0015 inch. Parts in noncritical assemblies tend to have looser tolerances

please rate brainliest if helps and follow

4 0
1 year ago
The modulus of elasticity for a ceramic material having 6.0 vol% porosity is 303 GPa. (a) Calculate the modulus of elasticity (i
Phantasy [73]

Answer:

modulus of elasticity for the nonporous material is 340.74 GPa

Explanation:

given data

porosity = 303 GPa

modulus of elasticity = 6.0

solution

we get here  modulus of elasticity for the nonporous material Eo that is

E = Eo (1 - 1.9P + 0.9P²)    ...............1

put here value and we get Eo

303 = Eo ( 1 - 1.9(0.06) + 0.9(0.06)² )  

solve it we get

Eo = 340.74 GPa

8 0
2 years ago
Other questions:
  • The y component of velocity in a steady, incompressible flow field in the xy plane is v = -Bxy3, where B = 0.4 m-3 · s-1, and x
    8·1 answer
  • Write down one metal or alloy that is best suited for each of the following applications:
    8·1 answer
  • Select all that apply.
    13·1 answer
  • What was the main drawback of Ford’s assembly line?
    12·2 answers
  • Acredit report summarizes a person's Acredit score is measure of a person's as a borrower a factor that contributes to a person'
    15·1 answer
  • prove that the heat transfer at the constant pressure is given by the enthalpy change during the process​
    7·1 answer
  • A seamless pipe carries 2400m³ of steam per hour at a pressure of 1.4N/mm².The velocity of flow is 30m/s.assuming the tensile st
    15·1 answer
  • Identify three questions a patient might ask of the nuclear medicine technologist performing a nuclear medicine exam.
    11·1 answer
  • It is acceptable to mix used absorbents.
    15·1 answer
  • Question 2: (a) In your own words, clearly distinguish and differentiate between Ethics in Engineering and Ethics in Computing (
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!