Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program #2 - Write a Python program that performs simple formulas for shapes. The code should contain the following: Function 1: Function Name: rectangle_perimeter Inputs:

Program #2 - Write a Python program that performs simple formulas for shapes. The code should contain the following:

Function 1: Function Name: rectangle_perimeter Inputs: (Parameters): • Determine the appropriate input(s) and write parameters for each Processing: Calculate the perimeter based on the algorithm Output: (Return): the perimeter

Function 2: Function Name: circle_perimeter Inputs: (Parameters): • Determine the appropriate input(s) and write parameters for each Processing: Calculate the perimeter based on the appropriate algorithm Output: (Return): the perimeter

Function 3: Function Name: triangle_perimeter Inputs: (Parameters): • Determine the appropriate input(s) and write parameters for each Processing: Calculate the perimeter based on the appropriate algorithm Output: (Return): the perimeter

Function 4: Function Name: rectangle_area Inputs: (Parameters): • Determine the appropriate input(s) and write parameters for each Processing: Calculate the area based on the algorithm Output: (Return): the area Function

5: Function Name: circle_area Inputs: (Parameters): • Determine the appropriate input(s) and write parameters for each Processing: Calculate the area based on the appropriate algorithm Output: (Return): the area Function

6: Function Name: triangle_area Inputs: (Parameters): • Determine the appropriate input(s) and write parameters for each Processing: Calculate the area based on the appropriate algorithm Output: (Return): the area

Function 7: Function Name: cube_volume Inputs: (Parameters): • Determine the appropriate input(s) and write parameters for each Processing: Calculate the volume based on the appropriate algorithm Output: (Return): the volume Function

8: Function Name: cylinder_volume Inputs: (Parameters): • Determine the appropriate input(s) and write parameters for each Processing: Calculate the volume based on the appropriate algorithm Output: (Return): the volume

The main area of the program that will:

• For each function:

o Ask the user for the appropriate inputs for the function

o Call the function

o Display the results with a user-friendly message

• Note that only the main area of the program should be asking for user inputs and displaying user outputs

• No loop is needed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

usrbinpython function to measure perimeter of rectangle require its length and breadth def r... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intermediate Accounting

Authors: David Spiceland, James Sepe, Mark Nelson, Wayne Thomas

8th edition

978-1259997525, 1259997529, 978-1259548185

More Books

Students also viewed these Accounting questions

Question

How can positive self-talk help you change a bad habit?

Answered: 1 week ago