Place these files in a lab2 folder. Before leaving lab, zip up this folder, and hand it in.
Type each of the following expressions into python3. What value do each of the following Python expressions evaluate to? Is that value an integer or a floating point?
Write your answers in the file answers.txt. (Review Unit 2A lecture slides if necessary.)
In sphere_vol.py, define a Python function sphere_vol(r) that calculates and returns the volume of a sphere with a radius r. This can be calculated using the formula:
V = (4/3) π r3Place in answers.txt a copy of your interaction with python3 in which you call sphere_vol(r) to compute the volume of a sphere with a radius of 7, and python3 shows you the result.
Pick a mathematical formula that is used in your major. (For APEA students, pick any mathematical formula that interests you.) In a file called my_func.py, create a python3 function that calculates some value using that formula.
At the beginning of your my_func.py include a comment (one or more lines of English text that start with "#" and are ignored by python3) that describes what the fomula the function computes and what units the parameters and results are in.