A triangle is called an equable triangle if its area equals its perimeter. Return `true`, if it is an equable triangle, else return `false`. You will be provided with the length of sides of the triangle. Happy Coding!

Source: codewars | Difficulty: EASY
Tags: Geometry

Fundamentals

Starter code: def equable_triangle(a,b,c):
	

Solutions:
def equable_triangle(a, b, c):
	p = a + b + c
	ph = p / 2
	return p * p == ph * (ph - a) * (ph - b) * (ph - c)


def equable_triangle(a, b, c):
	p = (a + b + c) / 2
	return (p * (p - a) * (p - b) * (p - c)) ** 0.5 == 2 * p


def equable_triangle(a, b, c):
	return (a + b + c) * 16 == (a + b - c) * (b + c - a) * (c + a - b)


def equable_triangle(a, b, c):
	perimeter = a + b + c
	sp = perimeter / 2
	area = (sp * (sp - a) * (sp - b) * (sp - c)) ** 0.5
	if perimeter == area:
		return True
	else:
		return False


def equable_triangle(a, b, c):
	return a + b + c == ((a + (b + c)) * (c - (a - b)) * (c + (a - b)) * (a + (b - c))) ** 0.5 / 4


def equable_triangle(a, b, c):
	s = (a + b + c) / 2.0
	A = (s * (s - a) * (s - b) * (s - c)) ** 0.5
	return A == s * 2


def equable_triangle(a, b, c):
	s = sum([a, b, c]) / 2
	return sum([a, b, c]) == (s * (s - a) * (s - b) * (s - c)) ** 0.5


from math import sqrt

def equable_triangle(a, b, c):
	perimeter = a + b + c
	ss = perimeter / 2
	try:
		area = sqrt(ss * (ss - a) * (ss - b) * (ss - c))
	except ValueError:
		return False
	return area == perimeter