Program to calculate area of a parallelogram | Python3 program for the above approach ; Function to return the area of parallelogram using sides and angle at the intersection of diagonal ; Calculate area of parallelogram ; Return the answer ; Function to return the area of parallelogram using sides and angle at the intersection of sides ; Calculate area of parallelogram ; Return the answer ; Function to return the area of parallelogram using diagonals and angle at the intersection of diagonals ; Calculate area of parallelogram ; Return the answer ; Given diagonal and angle ; Function Call ; Print the area
import math NEW_LINE def Area_Parallelogram1 ( a , b , theta ) : NEW_LINE INDENT area = ( abs ( math . tan ( math . radians ( theta ) ) ) / 2 ) * abs ( a ** 2 - b ** 2 ) NEW_LINE return area NEW_LINE DEDENT def Area_Parallelogram2 ( a , b , gamma ) : NEW_LINE INDENT area = ( abs ( math . sin ( math . radians ( gamma ) ) ) ) * abs ( a * b ) NEW_LINE return area NEW_LINE DEDENT def Area_Parallelogram3 ( d1 , d2 , theta ) : NEW_LINE INDENT area = ( abs ( math . sin ( math . radians ( theta ) ) ) / 2 ) * abs ( d1 * d2 ) NEW_LINE return area NEW_LINE DEDENT d1 = 3 NEW_LINE d2 = 5 NEW_LINE theta = 90 NEW_LINE area = Area_Parallelogram3 ( d1 , d2 , theta ) NEW_LINE print ( round ( area , 2 ) ) NEW_LINE