Question: Python 2.7 The purpose of this exercise is to create classes like class Circle from Chapter 7.2.3 for representing other geometric figures: a rectangle with
The purpose of this exercise is to create classes like class Circle from Chapter 7.2.3 for representing other geometric figures: a rectangle with width W, height H, and lower left corner (x_0, y_0); and a general triangle specified by its three vertices (x_0, y_0), (x_1, y_1), and (x_2, y_2) as explained in Exercise 3.3. Provide three methods: _ _init_ _. (to initialize the geometric data), area, and circumference. Name of program file: geometric_ahapes.py. Write a test code after the class definition to demonstrate its usage
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
