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
If i build thing a and thing a builds thing b did i build thing b
postnew [5]

Answer:

<h3>Yes</h3>

Explanation:

If you build thing "a" and thing "a" builds thing "b" you <u>indirectly</u> build thing "b".

3 0
3 years ago
Read 2 more answers
The wave-particle duality theory is the first adequate explanation of which one of the following observations about the hydrogen
Bingel [31]

Answer:

None of these is correct.

Explanation:

The wave particle duality has to do with Louis de Broglie's proposition that matter could exist as waves or particles.

According to him, matter poseses an associated wavelength. Hence, a certain wavelength is traceable to the hydrogen atom.

This wavelength is the ratio of Plank's constant to the momentum of the hydrogen atom

3 0
2 years ago
Carbon dioxide at a temperature of 0oC and a pressure of 600 kPa (abs) flows through a horizontal 40-mm- diameter pipe with an a
rusak2 [61]

Answer:

f = 0.04042

Explanation:

temperature = 0°C = 273k

p = 600 Kpa

d = 40 millemeter

e = 10 m

change in  P = 235 N/m²

μ = 2m/s

R = 188.9 Nm/kgk

we solve this using this formula;

P = ρcos*R*T

we put in the values into this equation

600x10³ = ρcos * 188.9 * 273

600000 = ρcos51569.7

ρcos = 600000/51569.7

=11.63

from here we find the head loss due to friction

Δp/pg = feμ²/2D

235/11.63 = f*10*4/2*40x10⁻³

20.21 = 40f/0.08

20.21*0.08 = 40f

1.6168 = 40f

divide through by 40

f = 0.04042

5 0
3 years ago
Pls help me answer my module
Otrada [13]

Answer:

Hand tools based on job requirement and its importance and the classification of hand tools according to its function and its importance are discussed below in details.

Explanation:

Hand tools based on work requirement is essential because Every tool is specifically invented for a particular purpose, so picking the accurate tool will also reduce the amount of energy needed to get work done right without causing injury or harm to either the tools or the exterior being worked on.

classifying of hand tools: wrenches, screwdrivers, cutters, striking tools, hammer tool or struck, pliers, vise, clamps, snips, saws, drills, and knives.

4 0
3 years ago
An o ring intended for use in a hydraulic system using MIL-H-5606 (mineral base) fluid will be marked with
Alex_Xolod [135]

An o ring intended for use in a hydraulic system using MIL-H-5606 (mineral base) fluid will be marked with a blue stripe or dot.

8 0
2 years ago
Other questions:
  • In C++ the declaration of floating point variables starts with the type name float or double, followed by the name of the variab
    14·1 answer
  • Pressurized steam at 450 K flows through a long, thin-walled pipe of 0.5-m diameter. The pipe is enclosed in a concrete casing t
    15·1 answer
  • The Manufacturing sector is the only sector where Lean manufacturing philosophy can be applied. a)- True b)- False
    12·1 answer
  • Show that the solution of thin airfoil theory of a symmetric airfoil given below satisfies the Kutta condition. What angle of at
    11·1 answer
  • In this lab, your task is to configure the external vEthernet network adapter with the following IPv6 address: Prefix: 2620:14F0
    14·1 answer
  • em 4:A water jet strikes normal to a xedplate. If diameter of the outlet of the nozzle is 8 cm,and velocity of water at the outl
    9·1 answer
  • A proposed piping and pumping system has 20-psig static pressure, and the piping discharges to atmosphere 160 ft above the pump.
    8·1 answer
  • A 40 mph wind is blowing past your house and speeds up as it flows up and over the roof. If the elevation effects are negligible
    14·1 answer
  • Rod of steel, 200 mm length reduces its diameter (50 mm) by turning by 2 mm with feed speed 25 mm/min. You are required to calcu
    11·1 answer
  • Jade wanted to test the effect of ice on the weathering of rocks. She filled two containers with gypsum and placed a water ballo
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!