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
10 POINTS!!
marusya05 [52]

Answer:

disable yahoo from activating.

Explanation:

 either force quit it or add chrome to your user bar at the bottom of the screen (if ure on a computer) if yahoo is on ur bar make sure to force quit it by right clicking and clicking "force quit" and it should stop

5 0
3 years ago
In a planetary geartrain with a form factor of 8, the sun gear rotates clockwise at 5 rad⁄s and the ring gear rotates clockwise
lina2011 [118]

Answer:

D. N= 11. 22 rad/s (CW)

Explanation:

Given that

Form factor R = 8

Speed of sun gear = 5 rad/s (CW)

Speed of ring gear = 12 rad/s (CW)

Lets take speed of carrier gear is N

From Algebraic method ,the relationship between speed and form factor given as follows

\dfrac{N_{sun}-N}{N_{ring}-N}=-R

here negative sign means that ring and sun gear rotates in opposite direction

Lets take CW as positive and ACW as negative.

Now by putting the values

\dfrac{N_{sun}-N}{N_{ring}-N}=-R

\dfrac{5-N}{12-N}=-8

N= 11. 22 rad/s (CW)

So the speed of carrier gear is 11.22 rad/s clockwise.

8 0
3 years ago
Rank the magnitudes of the diffusion coefficients from greatest to least for the following systems:(a) Cr in Fe at 600°C; (b) C
jek_recluse [69]

Answer:

Explanation:

The rank of the magnitude of the diffusion coefficient from greatest to least is as follows:

C in Fe at 900°C > Cr in Fe at 900°C > Cr in Fe at 600°C

Reason

C in Fe is an interstitial impurity while Cr in Fe is a substutional impurity.Therefore interstitial impurity occurs in C in Fe systems,while substutitional diffusion occurs in Cr in Fe system.Interstitial is much faster than substitutional diffusion hence the order

Also with increasing temperature magnitude of diffusion coefficient increases,due to the relation.

     D = D₀exp(-Qd/RT)

Where D₀=Temperature independent per exponential

           Qd= The activation energy for diffusion

             R= Universal gas constant

              T=absolute temperature

3 0
3 years ago
Read 2 more answers
Which of the following is NOT associated with Urban Sprawl?
pochemuha

The option that is not associated with the given term called urban sprawl is; Option A: Blocking high views

What is Urban Sprawl?

Urban sprawl is defined as the rapid expansion of the geographic boundaries of towns and cities which is often accompanied by low-density residential housing and increased reliance on the private automobilefor movement.

Looking at the given options, "blocking high views" is the option that is not typically a problem associated with urban sprawl because urbanization usually takes place on relatively flat levels.

The missing options are;

a. blocking high views

b. destroying animal habitats

c. overrunning farmland

d. reducing green space

Read more about urban sprawl at; brainly.com/question/504389

8 0
2 years ago
I have five brainliest why is it only showing 2?
svp [43]

Answer: Either your computer is malfunctioning or it is glitched and still thinks you only have 2. Also good job

Explanation: Leave a brainliest it helps

4 0
2 years ago
Other questions:
  • 2. In the above figure, what type of cylinder arrangement is shown in the figure above?
    9·1 answer
  • Define factor of safety and its significance
    5·1 answer
  • A Type I muscle fibers have an average diameter of 98 µm, and can exert a compressive load of 532 µN[1]. If they are modeled as
    11·1 answer
  • The Acme threading tool forms an inc luded angle of how many degrees? A. 30 B. 55 C. 29 D. 60
    10·1 answer
  • Calculate the equivalent capacitance of the three series capacitors in Figure 12-1
    5·1 answer
  • technician A says that a technician can progress to different jobs within the industry. Technician B says that career in the aut
    5·1 answer
  • How does java achieve portable
    13·1 answer
  • 5. Will rotating the tires extend their life?<br><br> O Yes<br> O No
    13·2 answers
  • Question 2
    10·1 answer
  • Why does my man bun not have its own erodynamics
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!