Ответсообщение недоступно
# Prompt for base and height
base = float(input("Enter base: "))
height = float(input("Enter height: "))
# Calculate area (multiplying by 0.5 automatically results in a float)
area = 0.5 * base * height
print(f"The area of the triangle is {area}")
# Prompt for three side lengths
side_a = float(input("Enter side a: "))
side_b = float(input("Enter side b: "))
side_c = float(input("Enter side c: "))
# Calculate perimeter and cast to float to match the 12.0 requirement
perimeter = side_a + side_b + side_c
print(f"The perimeter of the triangle is {perimeter}")