Following program shows you how to calculate triangle area.
This program gets triangle base and height from user and calculates area and prints it using following formula
Area = base X height / 2
triangleBase = float(input("Enter the base of triangle:")) triangleHeight = float(input("Enter the height of triangle:")) areaOfTriangle = (triangleBase * triangleHeight) / 2 print("Area of triangle is: ", areaOfTriangle)
Enter the base of triangle: 15 Enter the height of triangle: 9 Area of triangle is: 67.5
On By Navya
Getting 'No EntityManager with actual transaction available for current thread' exception while removing some data
How to fix Found use of deprecated [org.hibernate.id.SequenceGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead