Answer:
Here is the Python program:
def MyersTriangle(a, b, c): #method to test triangles
if not(isinstance(a, int) and isinstance(b, int) and isinstance(c, int)): #checks if values are of type int
return 'Enter integer values'
elif a==0 or b==0 or c==0: #checks if any value is equal to 0
return 'Enter integer values greater than 0'
elif a<0 or b<0 or c <0: #checks if any value is less than 0
return 'All values must be positive'
elif not (a+b>=c and b+c>=a and c+a>=b): #checks if triangle is valid
return 'Not a valid triangle'
elif a == b == c: #checks if triangle is equilateral
return 'triangle is equilateral'
elif a == b or b == c: #checks if triangle is isoceles
return 'triangle is isoceles'
elif a != b and a != c and b != c: #checks if triangle is scalene
return 'triangle is scalene'
#test cases
print(MyersTriangle(2.4,7.5,8.7))
print(MyersTriangle(0,0,0))
print(MyersTriangle(-1,5,4))
print(MyersTriangle(10,10,25))
print(MyersTriangle(5,5,5))
print(MyersTriangle(3,3,4))
print(MyersTriangle(3,4,5))
Step-by-step explanation:
The program uses if elif conditions to check:
if the values are integers: this is checked by using isinstance method that checks if values belongs to a particular int. If this returns true then values are integers otherwise not
if values are not 0: this is checked by using logical operator or between each variable which checks if any of the values is 0
if values are not negative: This is checked by using relational operator < which means the values are less than 0
if values make a valid triangle: this is checked by the rule that the sum of two sided of the triangle is greater than or equal to the third side.
and then checks if the triangle is scalene, isosceles, or equilateral: This is checked by the following rules:
For scalene all three sides are unequal in length
For isosceles any of the two sides are equal in length
For equilateral all sides should be equal in length.
The screenshot of the program along with the output is attached.