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

Subtraction - vector arithmetic, Subtraction - Vector arithmetic Compu...

Subtraction - Vector arithmetic Computationally, subtraction is very similar.  Given the vectors a → = (a 1 , a 2 , a 3 ) and b → = (b 1 , b 2 , b 3 ) the difference of the t

Example of developing an understanding, In class 1, the teacher had written...

In class 1, the teacher had written down the digits 0,1, ...., 9 on the board. Then she made all the children recite the corresponding number names. Finally, she made them write th

Problems involving motion - word problems, Problems Involving Motion - Word...

Problems Involving Motion - Word Problems: How far can a car travelling at a rate of 52 miles per hour travel in 2½ hours? Solution: Using Equation 13: s = vavt

Calculus (The squeeze theorem), When finding the limit as x approaches 0 th...

When finding the limit as x approaches 0 the for function (square root of x^3 + x^2) cos(pi/2x) would the limit not exist because there would be a zero in the denominator?

Trigonometry, if tan theta =1,find the value of sin4 theta + cos4 theta

if tan theta =1,find the value of sin4 theta + cos4 theta

Derivatives, What are the ingredients of a Mathematical Model? What is a mo...

What are the ingredients of a Mathematical Model? What is a model?

Rounding, what is the result if 816.537 is rounded to the nearest tenth

what is the result if 816.537 is rounded to the nearest tenth

Computation of covariance - ungrouped data, Computation of Covariance ...

Computation of Covariance Ungrouped Data          For a population consisting of paired ungrouped data points {X, Y} where,

Type i and type ii errors-rejection and acceptance regions, Type I and type...

Type I and type II errors When testing hypothesis (H 0 ) and deciding to either reject or accept a null hypothesis, there are four possible happenings. a) Acceptance of a t

Logarithmic functions, If x = b y where both b > 0, x > 0, then we d...

If x = b y where both b > 0, x > 0, then we define y = log b x, which is read as "y is the log to the base b of x". This means that, log b x or y is the number to

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