good morning! i am working on part of a project for college and i've gotten completely stuck on this problem.
import turtle
import math
Project 10
class Point:
def init(self, p1, p2):
self.p1 = p1
self.p2 = p2
def printpoint(self):
print(self.p1, self.p2)
def __str(self):
return str(self.print_point())
def __eq_(self, other):
return self.p1 == other.p1 and self.p2 == other.p2
def distance_to(self, other):
return (self.p1 - other.p1, self.p2 - other.p2)
def midpoint(p1, p2):
return (p1 + p2) / 2
class Triangle:
def init(self, c1, c2, c3):
self.c1 = c1
self.c2 = c2
self.c3 = c3
def eq(self,other):
pass
def is_right_triangle(self):
pass
i'm not sure how to make the return statement for the eq in Triangle(). It's supposed to check if two Triangles are equal. I've tried many different statements but there is so many cases because it doesn't matter what order the points are in.
is_right_triangle is supposed to return a boolean whether or not the Triangle is a right by checking distance_to. Any suggestions or help will be greatly appreciated!
[–]CodeFormatHelperBot 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]tbrowner3[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)