Text: Use Python and get part
a, b
Q3: Equilateral triangle - all sides are equal. Scalene triangle - none of the sides are equal. Isosceles triangle - at least two sides are equal. Set the vertices A, B, and C as below.
i: Write a Python program to calculate and print the sides (use 2 decimal places): a = |CB|, b = |AC|, and c = |BC|, and check if the triangle is equilateral/isosceles/scalene.
ii: Calculate and print the area of the triangle by the following formula: s = (a + b + c)/2, Area = √(s * (s - a) * (s - b) * (s - c)).
A = np.random.randint(low=2, high=100, size=2)
B = np.random.randint(low=2, high=10, size=2)
C = np.random.randint(low=2, high=100, size=2)
print(A, B, C)
13]: import math
import numpy as np
A = np.random.randint(low=2, high=100, size=2)
B = np.random.randint(low=2, high=100, size=2)
C = np.random.randint(low=2, high=100, size=2)
print(A, B, C)
[90 87] [21 45] [19 37]