define a function calc_pyramid_volume() with parameters base_length, base_width, and pyramid_height, that returns the volume of a pyramid with a rectangular base. calc_pyramid_volume() calls the given calc_base_area() function in the calculation. relevant geometry equations: volume = base area x height x 1/3 (watch out for integer division). sample output with inputs: 4.5 2.1 3.0 volume for 4.5, 2.1, 3.0 is: 9.45

Respuesta :

fichoh

The required program which calculates the volume of a pyramid written in python 3 is given below :

def calc_pyramid_volume(base_length,base_width,pyramid_height):

#initialize a function named calc_pyramid_volume and takes in 3 parameters

volume = (1/3) * base_length*base_width* pyramid_height

#the volume of pyramid formulae is used on the Parameters and the value is assigned to the variable named volume

return round(volume,2)

#the function returns the volume value rounded to 2 decimal places.

print(calc_pyramid_volume(4.5,2.1,3.0))

#the sample run

Learn more :https://brainly.com/question/25136233

Ver imagen fichoh
ACCESS MORE
ACCESS MORE
ACCESS MORE
ACCESS MORE