the volume of a pyramid, Mathematics

Assignment Help:

Write a script to determine the volume of a pyramid, which is 1/3 * base * height, where the base is length * width.  On time the user to enter values for the length, width, and the height and then determine the volume of the pyramid.  When the user enters every value, they will then be prompted also for either 'i' for inches, or 'c' for centimeters. (Note 2.54 cm = 1 inch).  Your script should print the volume in cubic inches with 3 decimal places.  As an instance, the output might look like this:

 

This script will calculate the volume of a pyramid.

Enter the length of the base: 50

Is that i or c? i

Enter the width of the base: 6

Is that i or c? c

Enter the height: 4

Is that i or c? i

The volume of the pyramid is xxx.xxx cubic inches.

 


Related Discussions:- the volume of a pyramid

Trinomial x2 + 2x + 1 what are the dimensions of the field, A farmer's rect...

A farmer's rectangular field has an area in which can be expressed as the trinomial x2 + 2x + 1. In terms of x, what are the dimensions of the field? Because the formula for th

Write triangles named by the lengths of their sides, Write Triangles Named ...

Write Triangles Named by the Lengths of Their Sides? An equilateral triangle is a triangle with three congruent sides. All three sides of this triangle are the same lengt

Fractions, How do you add 7/9 + 6/8 + 3/4

How do you add 7/9 + 6/8 + 3/4

Find sampling interval - horizontal and vertical asymptote, In a digital fi...

In a digital filter, one of the parameters in its difference equation is given by the formula a) Show that the above formula has one horizontal and one vertical asymptote.

Saddle point-game theory, Saddle Point This point in a pay off matrix i...

Saddle Point This point in a pay off matrix is one which is the largest value in its column and the smallest value in its row. This is also termed as equilibrium point in the t

Find the value of p and q for which the system of equations, Find the value...

Find the value of p and q for which the system of equations represent coincident lines 2x +3y = 7, (p+q+1)x +(p+2q+2)y = 4(p+q)+1 Ans: a 1  = 2, b 1 = 3, c 1 = 7 a 2  =

Lines, Standard form of the line Let's begin this section off along a q...

Standard form of the line Let's begin this section off along a quick mathematical definition of a line. Any equation that can be written in the following form,

Proof of sum-difference of two functions, Proof of Sum/Difference of Two Fu...

Proof of Sum/Difference of Two Functions : (f(x) + g(x))′  = f ′(x) +  g ′(x)  It is easy adequate to prove by using the definition of the derivative.  We will start wi

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd