Question: Must be in Python 3.6 (please have a screen shot on the code) ex 2.14 : # Enter three points for a triangle x1, y1,

Must be in Python 3.6 (please have a screen shot on the code)

Must be in Python 3.6 (please have a screen shot on the

code) ex 2.14 : # Enter three points for a triangle x1,

ex 2.14 :

# Enter three points for a triangle x1, y1, x2, y2, x3, y3 = eval(input("Enter three points for a triangle: "))

# Compute the length of the three sides side1 = ((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) ** 0.5 side2 = ((x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3)) ** 0.5 side3 = ((x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2)) ** 0.5

s = (side1 + side2 + side3) / 2; area = (s * (s - side1) * (s - side2) * (s - side3)) ** 0.5

print("The area of the triangle is", area)

GeometricObject class:

y1, x2, y2, x3, y3 = eval(input("Enter three points for a triangle:

12.1 (The Triangle class) Design a class named Triangle that extends the Geometricobject class. The Triangle class contains Three float data fields named sidel, side2, and side3 to denote the three sides of the triangle. A constructor that creates a triangle with the specified sidel, side2, and side3 with default values 1.0 The accessor methods for all three data fields. A method named getArea O that returns the area of this triangle A method named getPerimeterO that returns the perimeter of this triangle. A method named-str-O that returns a string description for the triangle

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!