Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Programming assignment 3, due Sunday October 8, by 11:00 pm

In this program you are to demonstrate your ability to create and use a module and
implement functional decomposition.
Start by asking the user’s name and greeting them. Inform them that this program
provides the opportunity to calculate the area and perimeter of various geometric
shapes.
• For this assignment you need to create a module and call it shapes.py
• This module should contain methods to calculate the area and the
circumference/perimeter of at least 3 geometric shapes.
• This module should be imported to your program.
• Your program should present a menu (in a loop) and ask the user which shape
they would like to calculate the area and the perimeter for.
• Display the formulas for determining the area and the circumference/perimeter of
the shape.
• Obtain the necessary dimensions from the user for the calculations.
• Invoke your shapes.py and calculate and return the results.
• Display the results.
• The program should exit when the user chooses Exit from the menu.
• Your program should be modularized and include at least a function for the menu
presentation, a function for processing the user’s choice with multiple ifs, and a
function for displaying the results.
• Each function should have its own documentation with regards to what the
function does, what parameter(s) it receives (if any), and what it returns (if any).
• The main() function should call the various functions.
Your program must be well documented with comments (your name, date of
creation, brief description) and your interactions with the user must be meaningful
and complete. Name your program lastname_Prog3.py and submit it using Isadore
before Sunday October 8, 11:00 pm
• Do not forget to submit both your shapes.py as well as your program file

You might also like