height=float(input("Enter height of triangle ")) base=float(input("Enter base of triangle ")) area=(height*base)/2; #calculate the area print("\n area of triangle using",height,"and",base,"=",area); Output: Enter height of triangle 4 Enter base of triangle 3 area of triangle using 4.0 and 3.0 = 6.0