Computer Science, asked by 8050119167s, 7 months ago

10. Write a python program to calculate Area of the triangle.
11. What is the method to delete an element from a tuples?​

Answers

Answered by avi86579
2

Answer:

11.Removing individual tuple elements is not possible. There is, of course, nothing wrong with putting together another tuple with the undesired elements discarded. To explicitly remove an entire tuple, just use the del statement.

10.Python program to find the area of a triangle

# Three sides of the triangle is a, b and c:

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.

11.

Answered by singhsahab47
1

Answer:

1 Python program to find the area of a triangle

# Three sides of the triangle is a, b and c:

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.

2 Removing individual tuple elements is not possible. There is, of course, nothing wrong with putting together another tuple with the undesired elements discarded. To explicitly remove an entire tuple, just use the del statement.

Similar questions