You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (a+b<=c or b+c<=a or c+a<b or c+a<=b):
print("This is Not a Triangle")
elif a==b and b==c:
print("Equilateral Triangle")
elif (a==b and b!=c or b==c and c!=a or c==a and a!=b):
print("Isosceles Triangle")
elif a!=b and b!=c:
print("Scalene Triangle","\n")
if (A==math.pi/2 or B==math.pi/2 or C==math.pi/2):
print("Right Triangle")
elif(A>math.pi/2 or B>math.pi/2 or C>math.pi/2):
print("Obtuse Triangle")
else:
print("Acute Triangle")
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
import math
a,b,c=float(input("a(unit)=")),float(input("b(unit)=")),float(input("c(unit)="))
print("\n")
A=math.acos((b2+c2-a2)/(2bc))
B=math.acos((c2+a2-b2)/(2ca))
C=math.acos((a2+b2-c**2)/(2ab))
s=(a+b+c)/2
Area=math.pow(s*(s-a)(s-b)(s-c),0.5)
Out_r=a/math.sin(A)/2
In_r=(a+b-c)/2*math.tan(C/2)
Ex_r_a=a/(math.tan(B/2)+math.tan(C/2))
Ex_r_b=b/(math.tan(C/2)+math.tan(A/2))
Ex_r_c=c/(math.tan(A/2)+math.tan(B/2))
Med_a=math.pow((2*(cc+bb)-aa)/4,.5)
Med_b=math.pow((2(cc+aa)-bb)/4,.5)
Med_c=math.pow((2(aa+bb)-c*c)/4,.5)
Bisec_A=2Area/(amath.cos((B-C)/2))
Bisec_B=2Area/(bmath.cos((C-A)/2))
Bisec_C=2Area/(cmath.cos((A-B)/2))
print("A=",A180/math.pi,"°")
print("B=",B180/math.pi,"°")
print("C=",C*180/math.pi,"°","\n")
print("Circumference=",s*2," unit")
print("Area=",Area," sq.unit","\n")
print("h(a)=",Area2/a," unit")
print("h(b)=",Area2/b," unit")
print("h(c)=",Area*2/c," unit","\n")
print("Median(a)=",Med_a," unit")
print("Median(b)=",Med_b," unit")
print("Median(c)=",Med_c," unit","\n")
print("Bisector(A)=",Bisec_A," unit")
print("Bisector(B)=",Bisec_B," unit")
print("Bisector(C)=",Bisec_C," unit","\n")
print("Outradius=",Out_r," unit")
print("Inradius=",In_r," unit")
print("Extraradius(a)=",Ex_r_a," unit")
print("Extraradius(b)=",Ex_r_b," unit")
print("Extraradius(c)=",Ex_r_c," unit","\n")
if (a+b<=c or b+c<=a or c+a<b or c+a<=b):
print("This is Not a Triangle")
elif a==b and b==c:
print("Equilateral Triangle")
elif (a==b and b!=c or b==c and c!=a or c==a and a!=b):
print("Isosceles Triangle")
elif a!=b and b!=c:
print("Scalene Triangle","\n")
if (A==math.pi/2 or B==math.pi/2 or C==math.pi/2):
print("Right Triangle")
elif(A>math.pi/2 or B>math.pi/2 or C>math.pi/2):
print("Obtuse Triangle")
else:
print("Acute Triangle")
Beta Was this translation helpful? Give feedback.
All reactions