## Write a Python program using functions to calculate area of a triangle after obtaining its three sides.

**
Answer:
**

```
```

**
import math
**

```
```

**
def
**
**
triangle_area
**
**
(a,b,c):
**

```
```

**
s=(a+b+c)/
**
**
2
**

```
```

**
ar=math.sqrt(s*(s-a)*(s-b)*(s-c))
**

```
```

**
return ar
**

```
```

**
a=float(input(
**
**
"Enter first side of the triangle: "
**
**
))
**

```
```

**
b=float(input(
**
**
"Enter second side of the triangle: "
**
**
))
**

```
```

**
c=float(input(
**
**
"Enter third side of the triangle: "
**
**
))
**

```
```

**
area=triangle_area(a,b,c)
**

```
```

**
print("The area of a triangle with sides ",a,", ",b,", ",c," is ",area)
**

Get live Maths 1-on-1 Classs - Class 6 to 12