How to write python programs using classes basic shapes

  python, python-class

Write a python program with class for the following basic shapes from lab 2 and add methods for volume:
The program will display the following:
Choices:

  1. Cylinder

  2. Cone

  3. Prism
    0-Exit
    Enter choice:

    If choice 1 is chosen the user will input the variables needed and the program will display area, volume. If choice 2 is chosen the user will input the variables needed, and then the program will display area and volume. If choice 3 is chosen the user will input the variables needed, and then the program will display area and volume.

Source: Python Questions

LEAVE A COMMENT