Question: PYTHON ll functions must include docstrings. Programs with functions must have the statement if __name__==__main__ Write a program to find the area of a triangle
PYTHON
ll functions must include docstrings. Programs with functions must have the statement
if __name__==__main__
Write a program to find the area of a triangle using functions.
a.
Write a function getData() for user to input the length and the perpendicular height of a
triangle.
b.
Write a function trigArea() to calculate the area of a triangle.
c.
Write a function displayData() to print the length, height, and the area of a triangle;
d.
Write the main() function to call getData(),call trigArea() and call displayData().
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
