Question: HOMEWORK 8 . 1 : Vector Magnitude Write a function that can take the rectangular components of a 3 D vector and returns the vector

HOMEWORK 8.1: Vector Magnitude
Write a function that can take the rectangular components of a 3D vector and returns the vector magnitude.
A3D=Axhat()+Ayhat()+Azwidehat(k),|A3D|=Ax2+Ay2+Az22
However, if the user only passes 2 values to the function, assume the vector is a 2D vector and return the magnitude of that.
A2D=Ax+Ayhat(),|A2D|=Ax2+Ay22
Eunction vectorMagnitude (x,y, Optional z)
vectorMagnitude =[ magnitude]
End Function
\table[[Ax,4,Ax,3],[Ay,4,Ay,4],[Az,7,|A|,],[|A|,,,]]
functions available from the
the
Check your answers. Here is an example of what you should get for the given inputs.
HOMEWORK 8.2: Volume and Surface Area of a Torus
In geometry, a torus is a surface of revolution generated by revolving a circle in threedimensional space one full revolution about an axis that is coplanar with the circle.
V=(2R)(r2)=22Rr2
The surface area is given as:
SA=(2R)(2r)=42Rr
Write 2 functions, one that calculates the volume of a torus, and one that calculate the surface area of a torus given the 2 radii defined above.
The instructor is going to pull up your module and read your code. For full credit, your code needs to have the proper header and be neatly commented. You will only get partial credit if your code works but is not clear.
 HOMEWORK 8.1: Vector Magnitude Write a function that can take the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!