Question: using python in jupyterlab using python in jupyterlab Create a VOLUME Function to compute the volume of Cylinders, Spheres, Cones, and Rectangular Boxes. This function
Create a VOLUME Function to compute the volume of Cylinders, Spheres, Cones, and Rectangular Boxes. This function should: First, ask the user about the shape of the object of interest using something like: "Please choose the shape of the object. Enter 1 for "Cylinder", 2 for "Sphere". 3 for "Cone", or 4 for "Rectangular Box Second, based on user's choice in the previous step, ask for the right inputs. Third, print out an statement with the input values and the calculated volumes. Include error trapping that: 1. Issues a message that "The object should be either a Cylinder, a Sphere, a Cone, or a Rectangular Box. Please Enter A Number from 1,2,3, and 4!" if the first input is non-numeric. 2. Takes any numeric input for the initial selection, and force it into an integer. 3. Issues an appropriate message if the user's selection is numeric but outside the range of [1,4]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
