CPSC120
Fundamentals of Computer Science

In-class Activity 4

  1. Oil Drum Volume

    Create a Python program that prints the volume of an oil drum in gallons if the drum's radius is 11.25 inches and the height is 33.5 inches. The volume of a cylinder can be computed using the equation, volume = area_of_base * height, and the area of a circle can be computed using the equation area = pi * r2. One gallon is 231 cubic inches.

  2. Age in Seconds Redux

    Create a Python program that prints your age in seconds. The program should use meaningful names for values and simple statements to make the program more readable.