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

Thursday, April 6, 2023

AREA OF TRIANGLE USING SARRUS METHOD

print("Enter the coordinates of point A")
x1=int(input("X = "))
y1=int(input("Y = "))
print("Enter the coordinates of point B")
x2=int(input("X = "))
y2=int(input("Y = "))
print("Enter the coordinates of point C")
x3=int(input("X = "))
y3=int(input("Y = "))
print("\n",'       A',"(",x1,",",y1,")")
print('        /\ ')
print('       /  \ ')
print('      /    \ ')
print('     /      \ ')
print('    /        \ ')
print('   /          \ ')
print('  /            \ ')
print(' /______________\ ')
print('B','              C')
print("(",x2,",",y2,")","   ","(",x3,",",y3,")")
print("\n","The coordinates of A =(",x1,",",y1,")")
print("\n","The coordinates of B =(",x2,",",y2,")")
print("\n","The coordinates of C =(",x3,",",y3,")")
A=abs((x1*(y2-y3)+x2*(y3-y1)+x3*(y1-y2))*0.5)
print("\n","The area of triangle ABC =",A,"sq. units")