Python
b = float(input('Enter Base of the triangle (b):\n'))
Calculate area of a Triangle in PYTHON
13 May
0
Write a program (WAP) in PYTHON to read two numbers from keyboard(User Input) and calculate the area of a Triangle.
b = float(input('Enter Base of the triangle (b):\n'))
h = float(input('Enter Height of the triangle (b):\n'))
area = (b*h) /2
print('Area of the triangle is = %0.2f sq. units\n' % area)
Try it Yourself ➠
Must Read :-
Previous article
Next article
Leave Comments
Post a Comment