Support our Blind Hand Charity by donating at 9818291723. Your contribution has the potential to bring about significant positive change for humanity.

Search This Blog

MY PROGRAMMES

Saturday, April 15, 2023

COLLINEARTY OR AREA OF TRIANGLE FORMED BY COORDINATES

print("Enter the coordinates of first point")
x1=float(input("X = "))
y1=float(input("Y = "))
print("Enter the coordinates of second point")
x2=float(input("X = "))
y2=float(input("Y = "))
print("Enter the coordinates of third point")
x3=float(input("X = "))
y3=float(input("Y = "))
a=(0.5)*(abs(x1*(y2-y3)+x2*(y3-y1)+x3*(y1-y2)))
if a==0:
    print("The points are collinear")
else:
    print("The area of the triangle =",a)