Question: In python Exercise 5 (graded) Write a function triangleChecker that doesn't take any input. The function reads triangle.txt which includes three numbers (each line has
In python

Exercise 5 (graded) Write a function "triangleChecker" that doesn't take any input. The function reads "triangle.txt" which includes three numbers (each line has one number). Assume these values are the side lengths of the triangle. The function should check the validity of the triangle and print whether the triangle is valid or not. If it is valid, the result should also indicate the type of triangle (equilateral, isosceles, or scalene). Here are some hints about triangles; *Triangle inequality only depends on the length of the sides. *An equilateral triangle is a triangle in which all three sides are equal A scalene triangle is a triangle that has three unequal sides. An isosceles triangle is a triangle with (at least) two equal sides Sample Input triangle.tt 1 5 2 4 3 6 Sample Output The triangle is valid. It is a scalene Triangle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
