The Python program below is designed to take the base and height of a triangle as inputs from the user, calculate its area using the formula:
Area=base×height2 \text{Area} = \frac{\text{base} \times \text{height}}{2} Area=2base×heightand output the calculated area.
There are three errors in the code.
1 base = input("Enter the base: ")
2 height = float(input("Enter the height: "))
3 area == (base * height) / 2
4 print("The area is " + area)
Identify the line number of each error and write the amended, correct line of code.