Is triangle a function in python?

Dec-13-2019, 09:57 AM [This post was last modified: Dec-13-2019, 02:28 PM by ichabod801.]

I'm pretty much having problems getting this program to run and i'm not sure whats wrong with my code in order to make sure everything is inputted correctly, I appreciate the assistance guys. Here is the assignment below:

For this assignment, you need to create a function that implements the Triangle Classification Algorithm. The algorithm has a lot of steps in it, but each step is simple. We have covered enough material to implement this.
The Triangle Classification Algorithm accepts three integer lengths and it returns a 1, 2, 3, or 4. The three lengths represent possible lengths to the sides of a triangle. Returning a 1 means that the lengths would form a scalene triangle. Returning a 2 means that the sides would form an isosceles triangle. Returning a 3 means that the sides would form an equilateral triangle. Returning a 4 means that the sides cannot form a triangle. For example, sides 1, 1, and 10 cannot form a triangle.
Below you will find a control flow graph of the algorithm. The brackets in the graph [ and ] are just there as a means of referencing each condition. Also, the || symbol is or. The top oval says, "Read i, j, k". These variables should be passed in as parameters to your function. The second oval is equivalent to
if i

Chủ Đề