Write a Python program that will accept the base and height of a triangle and compute the area


Introduction

Write a Python program that will accept the base and height of a triangle and compute the area. I have used python 3.7 compiler for debugging purpose.


techstudy.org

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

  1. base = int(input("Input the base : "))
  2. height = int(input("Input the height : "))
  3.  
  4. area = base*height/2
  5.  
  6. print("area = ", area)

Result

python language techstudy.org

     





Related Topics




Popular Posts