Question: Must be done in python Question 2: (50 points) Write a function triangleInput that takes in the input of three sides of a triangle a,

Must be done in python

Question 2: (50 points)

  1. Write a function triangleInput that takes in the input of three sides of a triangle a, b and c.

  2. From triangleInput call the two functions given below which takes a, b and c as function parameters.

  3. Write a function isValid to test if the input is valid. This function returns true if sum of every two sides is greater than the third side. If input is not valid, ask the user to input the sides again until the input is valid and returns false.

  4. If the input is valid call another function calcArea which calculates the area of the triangle using semi perimeter (s) as shown in the formula given below. Display the area using a meaningful print function.

a +b +c S =- Area Vs(8 a)(s b)(8 c)

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!