From 7807446f2902066e11476d4f27da3f46b43eef37 Mon Sep 17 00:00:00 2001 From: happy_heart_hacker Date: Sat, 2 Oct 2021 12:22:35 +0530 Subject: [PATCH] Update areatriangle.py make sqrt option more easy with import.math --- Python/areatriangle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Python/areatriangle.py b/Python/areatriangle.py index bef854f0..fb39aa4d 100644 --- a/Python/areatriangle.py +++ b/Python/areatriangle.py @@ -1,5 +1,5 @@ # Python Program to find the area of triangle - +import math a = 5 b = 6 c = 7 @@ -13,5 +13,5 @@ s = (a + b + c) / 2 # calculate the area -area = (s*(s-a)*(s-b)*(s-c)) ** 0.5 +area = (math.sqrt(s*(s-a)*(s-b)*(s-c))) print('The area of the triangle is %0.2f' %area)