Question: Python Programming Assignment Animal Pens Overview In this assignment, the student will write a Python script that uses mathematical assignments to solve a geometry problem.

Python Programming Assignment Animal Pens

Overview

In this assignment, the student will write a Python script that uses mathematical assignments to solve a geometry problem.

When completing this assignment, the student should demonstrate mastery of the following concepts:

General Python Programming Structure (Functions)

Mathematical Assignments

Mathematical Operators (+, -, *, /, %, **)

Geometric Modeling

User Interface Design Console Prompting

Assignment

The following layout is given for an animal housing facility with undermined dimensions for the following labeled areas:

Python Programming Assignment Animal Pens Overview In this assignment, the student will

Although the exact lengths are unknown, the spacial layout of the facility will model this diagram exactly.

Write a Python script that prompts the user for the cow-height, cow-length, rhino-height, rhino-length, turtle-height, turtle-length, and bird-radius. After storing these values, perform whatever intermediate mathematical calculations are necessary to display information about the area and perimeter for the Rhino Common Ground, Moo Cow Pen, Turtle Petting Area, and Bird Cage. Additionally, calculate and display the collective area and perimeter for the entire complex.

Properly document your solution and provide the user with a clean, intuitive interface.

IT MUST BE ABLE TO OUTPUT SOMETHING VERY SIMILAR TO BELOW:

write a Python script that uses mathematical assignments to solve a geometry

Here's what I have so far:

#functions def FindArea(height,length): return height*length def FindAreaForRadius(radius): return 3.14*radius*radius def FindPerimeter(height,length): return 2*(height+length) def FindPerimeterForRadius(radius): return 2*3.14*radius #user promting to take input cow_height = input("Enter cow Height : ") cow_length = input("Enter cow length : ") rhino_height = input("Enter rhino Height : ") rhino_length = input("Enter rhino length : ") turtle_height = input("Enter turtle Height : ") turtle_length = input("Enter turtle length : ") bird_radius = input("Enter bird radius : ")

#calling functions to calculate areas cow_area = FindArea(cow_height,cow_length) rhino_area = FindArea(rhino_height,rhino_length) turtle_area = FindArea(turtle_height,turtle_length) bird_area = FindAreaForRadius(bird_radius)

#calling functions to calculate perimeter cow_perimeter = FindPerimeter(cow_height,cow_length) rhino_perimeter = FindPerimeter(rhino_height,rhino_length) turtle_perimeter = FindPerimeter(turtle_height,turtle_length) bird_perimeter = FindPerimeterForRadius(bird_radius)

#Here I am printing value for cow, bird, turtle and rhino. print "Cow perimeter is "+str(cow_perimeter)+" Cow area is "+str(cow_area) print "Rhino perimeter is "+str(rhino_perimeter)+" Rhino area is "+str(rhino_area) print "Turtle perimeter perimeter is "+str(turtle_perimeter)+" Turtle area is "+str(turtle_area) print "Bird perimeter is "+str(bird_perimeter)+" Bird area is "+str(bird_area) #printing collective perimeter is nothing but adding all the perimeter #values and printing it to the console print cow_area+rhino_area+turtle_area+bird_area

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!