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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!