CS 170 Program 1: Fun with Rectangular Cuboids

Assignment date: 31 August 2018

Due date: 10 September 2018

This program uses functions to calculate simple properties of rectangular cuboids and shows the user the results.

According to Wikipedia, a rectangular cuboid is the name for the generalization of a rectangle to three dimensions. A three dimensional circle is a sphere. A three dimensional object whose sides are all squares is a cube. A three dimensional object whose sides are all rectangles and whose angles are all 90 degrees is a rectangular cuboid. Think the box that Amazon sent you your textbook in.

You know all you need to know about a rectangular cuboid if you know what I will call the height, width and depth. Your program should ask the user for those three values (as floats), then use separate functions to calculate the perimeter, surface area and volume of the rectangular cuboid. You should then report all three of those results to the user.

Use variables as you deem appropriate. Be sure to comment your code, giving each function a comment describing what it is and how it works and commenting the important steps in your main program.

When you are done:

Hand in a printout of your program (rcuboid.py) Be sure that the printout you hand in is clearly labelled with both your name (e.g., Humphrey Bogart) and your Truman username (e.g., hsb1234).

Upload the source code (rcuboid.py) for your program, selecting Program 1 as the assignment you are uploading.