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
Neporo4naja [7]
3 years ago
6

Let r be a bank's interest rate in percent per year (APR). An initial amount of money P, also called as principal, will mature t

o an amount of P(1+r/100)^n after n years have passed. Write a Python program that takes P, r, and n as inputs from the user and provides as output the matured value after n years. For example if the user provides P, r, and n as 1000 0.95 and 5 .Your program must apply the interest-rate formula and provide 1048.4111145526908 as the output.
Engineering
1 answer:
Liono4ka [1.6K]3 years ago
7 0

Answer:

See explanation below.

Explanation:

For this case the program needs to take the inputs as P,r and n and the output would be as A and printed on the system. The code is:

# Inputs

P = float(input("Enter the present value : "))  

r = float(input("Enter your APR : "))  

n = float(input("Enter the number of years : ") )

# Output

A = P*(1 +(r/100))**n

print("The future values is:", A)  

And the result obtained is:

Enter the present value : 1000

Enter your APR : 0.95

Enter the number of years : 5

The future values is: 1048.4111145526908

You might be interested in
Which statement most accurately describes Pascal's law?
marin [14]

Answer:

La  C

Explanation:

7 0
3 years ago
Read 2 more answers
Π/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 ...
leva [86]

Answer: Pi= 4 - 4/3 + 4/5 - 4/7 + 4/9 ...

Explanation:

Is the same as the example,

If Π/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 ...

Then

(Π/4 )*4= 4*(1 - 1/3 + 1/5 - 1/7 + 1/9 ...)

Π =4 - 4/3 + 4/5 - 4/7 + 4/9 ...

The way to write this is

Sum(from n=0 to n=inf) of (-1)^n 4/(2n+1)

(photo)

6 0
3 years ago
Define an ADT for a two-dimensional array of integers. Specify precisely the basic operations that can be performed on such arra
VashaNatasha [74]

Answer:

Explanation:

ADT for an 2-D array:

struct array{

int arr[10];

}arrmain[10];

An application that stores an array with 1000 rows and 1000 columns, where less than 10,000 of the array values are non-zero. The two different implementations for such arrays that would be more space efficient than a standard two-dimensional array implementation requiring one million positions are :

1) struct array{

int *p;

}arr[1000];

2) struct array{

int *p;

}arr[1000];

6 0
3 years ago
Earth completes one full ____ on its axis every 24 hours
mars1129 [50]

Answer:

rotation

Explanation:

I just answered this!

7 0
2 years ago
Read 2 more answers
A rich industrialist was found murdered in his house. The police arrived at the scene at 11:00 PM. The temperature of the corpse
d1i1m1o1n [39]

Answer:

The dude was killed around 6:30PM

Explanation:

Newton's law of cooling states:

    T = T_m + (T_0-T_m)e^{kt}

where,

T_0 = initial temp

T_m = temp of room

T = temp after t hours

k = how fast the temp is changing

t = time (hours)

T_0 = 31     because the body was initlally 31ºC when the police found it

T_m = 22   because that was the room temp

T = 30  because the body temp drop to 30ºC after 1 hour

t = 1 because that's the time it took for the body temp to drop to 30ºC

k=???   we don't know k so we must solve for this

rearrange the equation to solve for k

T = T_m + (T_0-T_m)e^{kt}

T - T_m= (T_0-T_m)e^{kt}

\frac{T - T_m}{(T_0-T_m)}= e^{kt}

ln(\frac{T - T_m}{T_0-T_m})=kt

\frac{ln(\frac{T - T_m}{T_0-T_m})}{t}=k

plug in the numbers to solve for k

k = \frac{ln(\frac{T - T_m}{T_0-T_m})}{t}

k = \frac{ln(\frac{30 - 22}{31-22})}{1}

k=ln(\frac{8}{9})

Now that we know the value for k, we can find the moment the murder occur. A crucial information that the question left out is the temperature of a human body when they're still alive. A living human body is about 37ºC. We can use that as out initial temperature to solve this problem because we can assume that the freshly killed body will be around 37ºC.

T_0 = 37     because the body was 37ºC right after being killed

T_m = 22   because that was the room temp

T = 31  because the body temp when the police found it

k=ln(\frac{8}{9})   we solved this earlier

t = ???   we don't know how long it took from the time of the murder to when the police found the body

Rearrange the equation to solve for t

T = T_m + (T_0-T_m)e^{kt}

T - T_m= (T_0-T_m)e^{kt}

\frac{T - T_m}{(T_0-T_m)}= e^{kt}

ln(\frac{T - T_m}{T_0-T_m})=kt

\frac{ln(\frac{T - T_m}{T_0-T_m})}{k}=t

plug in the values

t=\frac{ln(\frac{T - T_m}{T_0-T_m})}{k}

t=\frac{ln(\frac{31 - 22}{37-22})}{ln(8/9)}

t=\frac{ln(3/5)}{ln(8/9)}

t=\frac{ln(3/5)}{ln(8/9)}

t ≈ 4.337 hours from the time the body was killed to when the police found it.

The police found the body at 11:00PM so subtract 4.337 from that.

11 - 4.33 = 6.66 ≈ 6:30PM

7 0
3 years ago
Other questions:
  • There are 20 forging presses in the forge shop of a small company. The shop produces batches of forgings requiring a setup time
    10·1 answer
  • If the specific surface energy for aluminum oxide is 0.90 J/m2 and its modulus of elasticity is (393 GPa), compute the critical
    11·1 answer
  • Air is used as the working fluid in a simple ideal Brayton cycle that has a pressure ratio of 12, a compressor inlet temperature
    13·1 answer
  • g A plane stress element has components sigma x = 160 MPa, tau xy = 100 MPa (CW). Determine the two values pf sigma y for which
    13·1 answer
  • Dunno what to ask, okbye
    5·1 answer
  • The air velocity in the duct of a heating system is to be measured by a Pitot-static probe inserted into the duct parallel to th
    13·1 answer
  • A gas has an initial volume o.25m^3, and absolute pressure 100kPa. Its initial temperature is 290k. The gas is compressed into a
    11·1 answer
  • Cite another example of information technology companies pushing the boundaries of privacy issues; apologizing, and then pushing
    9·1 answer
  • ASAP correct answer plss When you are driving, if you see this traffic sign it means
    8·1 answer
  • Lars is a medical coder. He works for a hospital in Wisconsin but currently lives in Georgia. Lars does his work online and over
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!