Answered step by step
Verified Expert Solution
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 : Vector Magnitude
Write a function that can take the rectangular components of a D vector and returns the vector magnitude.
hathatwidehat
However, if the user only passes values to the function, assume the vector is a D vector and return the magnitude of that.
hat
Eunction vectorMagnitude Optional
vectorMagnitude magnitude
End Function
table
functions available from the
the
Check your answers. Here is an example of what you should get for the given inputs.
HOMEWORK : 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.
The surface area is given as:
Write functions, one that calculates the volume of a torus, and one that calculate the surface area of a torus given the 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started