Hello Guys, This python program will calculate the area of equilibrium triangle. It takes the value of three sides from command line and check the third side of triangle has value greater than the sum of other two side and then calculate area for that. If the value of sides are not well then it gives error message. import sys import math def areaTriangle (values): i=1 j=2 print("File Name : ",values[0]) #print(values[1],values[2],values[3]) s=(int(values[1])+int(values[2])+int(values[3]))/2 print(s) area=math.sqrt(s * (s-int(values[1])) * (s-int(values[2])) * (s-int(values[3]))) print("Area Of Triangle Of Three Side ",area) values=sys.argv if (len(values)<=1): print("Don't Have Any Argument") else: if ((values[1]+values[2])<values[3] or (values[2]+values[3])<values[1]…
-
-
The formula to find area of circle :: 3.14 * radius * radius The formula to find area of triangle :: 0.5 * base * height Here, We are using two classes, one which contains main method and another one which contains the sub code. The area class contains two method one is circle() that is used to find the area of circle. It takes the radius from user using Scanner class, and the find the area as per the formula giver above. It takes value of PI is defined globally as Constant using final keyword. This method is called…