Question: THE FOLLOWING CODE HAS TO BE IN PYTHON: The code is required to read three real numbers ( a , b , c ) that
THE FOLLOWING CODE HAS TO BE IN PYTHON:
The code is required to read three real numbers a b c that represent the sides of a possible triangle. So that they form a triangle the sum of each pair of sides has to be greater than the third side. This has to be true for each pair on sides. The program must determine the values for the following alphanumeric variables string type: tria: It will be assigned the value triangle if the three real numbers form a triangle or the value of not triangle if not.
isos: The value isosceles will be assigned if the three sides form a triangle and if at least two of the three sides are equal, or the value of not isosceles if not.
equi: The value equilateral will be assigned if the three sides form a triangle and if the three sides are equal, or the value of nonequilateral if not.
esca: It will be assigned the value scalene if the three sides form a triangle and the three sides are different, or the value of not scalene if not.
At the end of the program you must write the four string variables: tria, equi, isos and esca. You have to use the ifelif structure, if applicable.
Run the program four times for the following values: ; ; ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
