Practice Question: Using the return Command for Formulas

Outcomes include:
CS20-FP1 Utilize different data types, including integer, floating point, Boolean and string, to solve programming problems
(g) Write expressions using math operators (e.g., addition (+), subtraction (-), multiplication (*), division (/), integer division (//) and modulo division (%))
(i) Perform data type conversions (e.g., string to integer, floating point to integer and integer to Boolean).

CS20-FP3 Construct and utilize functions to create reusable pieces of code.

Consider a triangular pyramid:

Since surface area and volume of a triangular pyramid using the area of a triangle, it makes the code more efficient by returning the formula.

Using the methods in the example above, create a program that calculates the surface area and volume of a cylinder using area of a circle. I started the program for you and defined pi.