Question: % Problem 2 . 8 % a ) The volume of a cylinder is v = pi * r ^ 2 * h % Define
Problem
a The volume of a cylinder is v pi rh
Define the radius, r as and the height, h as the matrix
h
r ;
h ;
Find the volume of the cylinders by performing an array calculation. This means you must use array operators
Your answer should be an array named vol.
Enter the code to find the volume, vol here
b The area of a triangle is the length of the base of the triangle, times the height of the triangle.
Define the base as the matrix
b
and the height, h as
Find the area of the triangles by performing an array calculation. Your answer should be an array named area.
b ;
h ;
Enter the code to find the area, named area, here
Although you don't have to use the operator for both
multiplications and the for the division it won't hurt if you do
and is good practice
c The volume of any right prism is the area of the base of the prism, times the vertical dimension of the prism.
The base of the prism can be any shape, for example a circle, a rectangle or a triangle.
Find the volume of the prisms created from the triangles in part b of this problem.
Assume that the vertical dimension of these prisms is Once again you must use an array calculation. Your answer should be an array named volprism.
Redefine h here
Calculate the volume of the prisms here and name the result volprism
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
