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
A 2-cm-diameter vertical water jet is injected upward by a nozzle at a speed of 15 m/s. Determine the maximum weight of a flat p
Ede4ka [16]

Answer:58.28 N

Explanation:

Given data

dia. of nozzle \left ( d\right )=2 cm

initial velocity\left ( u\right )=15 m/s

height\left ( h\right )=2m

Now velocity of jet at height of 2m

v^2-u^2=2gh

v^2=15^2-2\left ( 9.81\right )\left ( 2\right )

v=\sqrt{185.76}=13.62 m/s

Now\ forces\ on\ plate\ are\ weight\left ( Downward\right ) and jet\ force\left ( upward\right )

equating them

W=\left ( \rho Av\right )v

W=10^{3}\times \frac{\pi}{4}\left ( 0.02\right )^2\times 13.62^2

W=58.28 N

7 0
4 years ago
A Service Schedule is...
VikaD [51]

Answer:

option c

Explanation:

8 0
3 years ago
Read 2 more answers
Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and water, in cylindrical containe
USPshnik [31]

Answer:

circleType.h

#ifndef circleType_H

#define circleType_H

class circleType

{

public:

void print();

void setRadius(double r);

//Function to set the radius.

//Postcondition: if (r >= 0) radius = r;

// otherwise radius = 0;

double getRadius();

//Function to return the radius.

//Postcondition: The value of radius is returned.

double area();

//Function to return the area of a circle.

//Postcondition: Area is calculated and returned.

double circumference();

//Function to return the circumference of a circle.

//Postcondition: Circumference is calculated and returned.

circleType(double r = 0);

//Constructor with a default parameter.

//Radius is set according to the parameter.

//The default value of the radius is 0.0;

//Postcondition: radius = r;

private:

double radius;

};

#endif

circleTypeImpl.cpp

#include <iostream>

#include "circleType.h"

using namespace std;

void circleType::print()

{

cout << "Radius = " << radius

<< ", area = " << area()

<< ", circumference = " << circumference();

}

void circleType::setRadius(double r)

{

if (r >= 0)

radius = r;

else

radius = 0;

}

double circleType::getRadius()

{

return radius;

}

double circleType::area()

{

return 3.1416 * radius * radius;

}

double circleType::circumference()

{

return 2 * 3.1416 * radius;

}

circleType::circleType(double r)

{

setRadius(r);

}

cylinderType.h

#ifndef cylinderType_H

#define cylinderType_H

#include "circleType.h"

class cylinderType: public circleType

{

public:

void print();

void setHeight(double);

double getHeight();

double volume();

double area();

//returns surface area

cylinderType(double = 0, double = 0);

private:

double height;

};

#endif

cylinderTypeImpl.cpp

#include <iostream>

#include "circleType.h"

#include "cylinderType.h"

using namespace std;

cylinderType::cylinderType(double r, double h)

: circleType(r)

{

setHeight(h);

}

void cylinderType::print()

{

cout << "Radius = " << getRadius()

<< ", height = " << height

<< ", surface area = " << area()

<< ", volume = " << volume();

}

void cylinderType::setHeight(double h)

{

if (h >= 0)

height = h;

else

height = 0;

}

double cylinderType::getHeight()

{

return height;

}

double cylinderType::area()

{

return 2 * 3.1416 * getRadius() * (getRadius() + height);

}

double cylinderType::volume()

{

return 3.1416 * getRadius() * getRadius() * height;

}

main.cpp

#include <iostream>

#include <iomanip>

using namespace std;

#include "cylinderType.h"

int main()

{

double radius,height;

double shippingCostPerLi,paintCost,shippingCost=0.0;

 

cout << fixed << showpoint;

cout << setprecision(2);

cout<<"Enter the radius :";

cin>>radius;

 

cout<<"Enter the Height of the cylinder :";

cin>>height;

 

 

cout<<"Enter the shipping cost per liter :$";

cin>>shippingCostPerLi;

 

 

//Creating an instance of CylinderType by passing the radius and height as arguments

cylinderType ct(radius,height);

 

double surfaceArea=ct.area();

double vol=ct.volume();

 

 

shippingCost+=vol*28.32*shippingCostPerLi;

 

char ch;

 

cout<<"Do you want the paint the container (y/n)?";

cin>>ch;

if(ch=='y' || ch=='Y')

{

cout<<"Enter the paint cost per sq foot :$";

cin>>paintCost;    

shippingCost+=surfaceArea*paintCost;    

}    

cout<<"Total Shipping Cost :$"<<shippingCost<<endl;

 

return 0;

}

3 0
3 years ago
Differentiate between isohyetal method and arithmetical average method of rainfall​
prohojiy [21]

Answer:

Explained below

Explanation:

The isohyetal method is one used in estimating Rainfall whereby the mean precipitation across an area is gotten by drawing lines that have equal precipitation. This is done by the use of topographic and other data to yield reliable estimates.

Whereas, the arithmetic method is used to calculate true precipitation by the way of getting the arithmetic mean of all the points or arial measurements that will be considered in the analysis.

7 0
3 years ago
What is the probability that Tina will NOT wear a white t-shirt on the first day of her trip?
katrin2010 [14]

Answer:

4/5

Explanation:

She is not wearing white t-shirt on the first day so she is wearing the other 4 t-shirt

4 0
3 years ago
Other questions:
  • The human circulatory system consists of a complex branching pipe network ranging in diameter from
    10·1 answer
  • . A storm sewer is carrying snow melt containing 1.200 g/L of sodium chloride into a small stream. The stream has a naturally oc
    8·1 answer
  • Give the approximate temperature at which creep deformation becomes an important consideration for each of the following metals:
    5·1 answer
  • 3. Which of the following is not a common impact
    7·1 answer
  • A binary liquid system exhibits LLE at 25°C. Determine from each of the following sets of miscibility data estimates for paramet
    10·1 answer
  • What type of fuel does a 2 cycle engine use
    5·1 answer
  • Which organisms are consumers in this food chain? List all that apply. *
    5·1 answer
  • Merchandise without an expiration date like electronics, tools and home goods typically have a longer
    15·1 answer
  • When framing a building, a simple way to estimate the total amount of wall studs needed is to allow
    7·1 answer
  • Precast concrete curtain wall panels: Group of answer choices are typically manufactured on site and then hoisted into place. of
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!