Fill in the missing code#Name:import math#define functions #return type: float#Parameters: 2 floats(l and w)#This function returns the area of a rectangle with the given dimensionsdef RectangleArea(l,w):#return type: float#Parameters: 2 floats(l and w)#This function returns the perimeter of a rectangle with the given dimensionsdef RectanglePerimeter(l,w):#return type: float#Parameters: 1 floats(r)#This function returns the area of a circle with the given radiusdef CircleArea(r):#return type: float#Parameters: 1 floats(r)#This function returns the circumference of a circle with the given radiusdef CircleCircumference(r):#return type: None#Parameters: None#This function displays an introductiondef Intro():#return type: None#Parameters: 4 floats(rectArea, rectPer, circArea, circum)#This function displays the four values passed to itdef PrintInfo(rectArea, rectPer, circArea, circum ): #return type: float#Parameters: None#This function prompts the user for a length(must be positive) and returns itdef GetLength():#local variables#float length#return type: float#Parameters: None#This function prompts the user for a width(must be positive) and returns itdef GetWidth():#local variables#float width#return type: float#Parameters: None#This function prompts the user for a radius(must be positive) and returns itdef GetRadius():#local variables#float radius def main():#declare and initialize variables#float mylength, mywidth, myradius, myrectarea, myrectper,#mycircarea, mycircummylength = 0.0mywidth = 0.0myradius = 0.0myrectarea = 0.0myrectper = 0.0mycircarea = 0.0mycircum = 0.0 #call(invoke) Intro function #call a function to prompt for a length and store in mylength #call a function to prompt for a width and store in myWidth #call a function to prompt for a radius and store in myradius #invoke a function to store the area of the rectangle in myrectarea #invoke a function to store the perimeter of the rectangle in myrectper #invoke a function to store the area of the circle in mycircarea #invoke a function to store the circumference of the circle in mycircum #call a function to display the results of the above calculations#call a function to display the area of a rectangle with dimensions 10 x 15#call a function to display the area of a circle with radius 8
Fill in the missing code
#Name:
import math
#define functions
#return type: float
#Parameters: 2 floats(l and w)
#This function returns the area of a rectangle with the given dimensions
def RectangleArea(l,w):
#return type: float
#Parameters: 2 floats(l and w)
#This function returns the perimeter of a rectangle with the given dimensions
def RectanglePerimeter(l,w):
#return type: float
#Parameters: 1 floats(r)
#This function returns the area of a circle with the given radius
def CircleArea(r):
#return type: float
#Parameters: 1 floats(r)
#This function returns the circumference of a circle with the given radius
def CircleCircumference(r):
#return type: None
#Parameters: None
#This function displays an introduction
def Intro():
#return type: None
#Parameters: 4 floats(rectArea, rectPer, circArea, circum)
#This function displays the four values passed to it
def PrintInfo(rectArea, rectPer, circArea, circum ):
#return type: float
#Parameters: None
#This function prompts the user for a length(must be positive) and returns it
def GetLength():
#local variables
#float length
#return type: float
#Parameters: None
#This function prompts the user for a width(must be positive) and returns it
def GetWidth():
#local variables
#float width
#return type: float
#Parameters: None
#This function prompts the user for a radius(must be positive) and returns it
def GetRadius():
#local variables
#float radius
def main():
#declare and initialize variables
#float mylength, mywidth, myradius, myrectarea, myrectper,
#mycircarea, mycircum
mylength = 0.0
mywidth = 0.0
myradius = 0.0
myrectarea = 0.0
myrectper = 0.0
mycircarea = 0.0
mycircum = 0.0
#call(invoke) Intro function
#call a function to prompt for a length and store in mylength
#call a function to prompt for a width and store in myWidth
#call a function to prompt for a radius and store in myradius
#invoke a function to store the area of the rectangle in myrectarea
#invoke a function to store the perimeter of the rectangle in myrectper
#invoke a function to store the area of the circle in mycircarea
#invoke a function to store the circumference of the circle in mycircum
#call a function to display the results of the above calculations
#call a function to display the area of a rectangle with dimensions 10 x 15
#call a function to display the area of a circle with radius 8
Step by step
Solved in 2 steps with 5 images