We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 581b25a commit 2819d41Copy full SHA for 2819d41
1 file changed
python2/koans/triangle.py
@@ -18,10 +18,12 @@
18
# about_triangle_project_2.py
19
#
20
def triangle(a, b, c):
21
- # DELETE 'PASS' AND WRITE THIS CODE
22
- pass
23
-
24
+ if a == b == c:
+ return 'equilateral'
+ elif a == b or a == c or c == b:
+ return 'isosceles'
25
+ else:
26
+ return 'scalene'
27
# Error class used in part 2. No need to change this code.
28
class TriangleError(StandardError):
29
pass
0 commit comments