From f7fd05d23e5f5713c8f0afc97c6481653f464267 Mon Sep 17 00:00:00 2001 From: Masiullah07 Date: Tue, 20 Feb 2024 14:11:36 +0530 Subject: [PATCH 1/2] first commit --- ops1.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ops1.py diff --git a/ops1.py b/ops1.py new file mode 100644 index 0000000..cf444e5 --- /dev/null +++ b/ops1.py @@ -0,0 +1,17 @@ +# Python Program to find the area of triangle + +a = 5 +b = 6 +c = 7 + +# Uncomment below to take inputs from the user +# a = float(input('Enter first side: ')) +# b = float(input('Enter second side: ')) +# c = float(input('Enter third side: ')) + +# calculate the semi-perimeter +s = (a + b + c) / 2 + +# calculate the area +area = (s*(s-a)*(s-b)*(s-c)) ** 0.5 +print('The area of the triangle is %0.2f' %area) \ No newline at end of file From 11cd010bbde0313bb5b4df6703c8b8f538abf47d Mon Sep 17 00:00:00 2001 From: I MOHAMMED MASIULLAH <155222756+Masiullah07@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:14:09 +0530 Subject: [PATCH 2/2] Update ops1.py --- ops1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ops1.py b/ops1.py index cf444e5..6acebc1 100644 --- a/ops1.py +++ b/ops1.py @@ -1,8 +1,8 @@ # Python Program to find the area of triangle -a = 5 +a = 10 b = 6 -c = 7 +c = 5 # Uncomment below to take inputs from the user # a = float(input('Enter first side: ')) @@ -14,4 +14,4 @@ # calculate the area area = (s*(s-a)*(s-b)*(s-c)) ** 0.5 -print('The area of the triangle is %0.2f' %area) \ No newline at end of file +print('The area of the triangle is %0.2f' %area)