Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Present a systems and situational approach to motivation?

Answered: 1 week ago