Project-
A printout showing the codes developed and outputs produced for the tests indicated. Deadline is strictly observed.
A. Implement a Triangle class in Python:
1. The triangle is defined by its three side lengths - a, b, and c.
2. The class includes methods that perform the following operations:
a. is_triangle - checks whether the given side lengths form a proper triangle;
b. area - returns the area of the triangle if properly formed; None otherwise;
c. perimeter - returns the perimeter of the triangle if properly formed; None otherwise;
d. a_angle, b_angle, c_angle - returns the vertex angle opposite to side a, side b, and side c, respectively, if the triangle is properly formed; None otherwise;
e. angles - returns the angles of the triangle;
f. __str__ - returns a string representation of a triangle object: side lengths, angles, perimeter, and area;
g. draw_triangle - draws a triangle of the given parameters using turtle. Test the Triangle class given the following data sets: (a, b, c) = (100, 100, 72), (100, 100, 100√2), (100, 50, 50).
B. Implement a Isosceles subclass of the Triangle class in Python:
1. The isosceles is defined by the side length - a - of the two equal sides and the angle formed by the two sides - angle -- in degrees.
2. The class includes or inherits methods that perform the following operations:
a. is_triangle - checks whether the given side lengths constitute a proper triangle;
b. area - returns the area of the triangle;
c. perimeter - returns the perimeter of the triangle;
d. a_angle, b_angle, c_angle - returns the vertex angle opposite to side a, side b, and side c, respectively;
e. angles - returns the angles of the triangle;
f. __str__ - returns a string representation of a triangle object: side lengths, angles, perimeter, and area;
g. draw_triangle - draws a triangle of the given parameters using turtle.
Test the Isosceles class given the following data sets: (a, angle) = (100, 72), (100, 90), (100, 60).
C. Implement a PieChart class in Python:
1. The class includes or inherits a method that draws a pie chart of a given data set {(key, value)|1,2, . . ,n } using turtle:
a. The area of a slice of the pie chart is proportional to the percentage of an item value in the data set;
b. Each slice of the pie chart has a different color;
c. The pie chart has a legend that visually shows or relates the pie chart slices to their corresponding keys and values.
Test the PieChart class using the set of frequency of letters in "Words.txt" file -- {(letter, frequency)|1,2, . . ,n} -- you obtained in a previous exercise or project.