<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Triangle Project Code.

# Triangle analyzes the lengths of the sides of a triangle
# (represented by a, b and c) and returns the type of triangle.
#
# It returns:
#   'equilateral'  if all sides are equal
#   'isosceles'    if exactly 2 sides are equal
#   'scalene'      if no sides are equal
#
# The tests for this method can be found in
#   about_triangle_project.py
# and
#   about_triangle_project_2.py
#
def triangle(a, b, c):
    # DELETE 'PASS' AND WRITE THIS CODE
    if a == b == c:
    	return 'equilateral'
    elif a == b or b == c or c == a:
    	return 'isosceles'
    else:
    	return 'scalene'
# Error class used in part 2.  No need to change this code.
class TriangleError(Exception):
    pass<commit_msg>finished Triangle 2<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Triangle Project Code.

# Triangle analyzes the lengths of the sides of a triangle
# (represented by a, b and c) and returns the type of triangle.
#
# It returns:
#   'equilateral'  if all sides are equal
#   'isosceles'    if exactly 2 sides are equal
#   'scalene'      if no sides are equal
#
# The tests for this method can be found in
#   about_triangle_project.py
# and
#   about_triangle_project_2.py
#
def triangle(a, b, c):
    # DELETE 'PASS' AND WRITE THIS CODE
    if a < 1 or b < 1 or c < 1:
    	raise TriangleError
    if (a + b < c) or (a + c < b) or (b + c < a):
    	raise TriangleError

    if a == b == c:
    	return 'equilateral'
    elif a == b or b == c or c == a:
    	return 'isosceles'
    else:
    	return 'scalene'
# Error class used in part 2.  No need to change this code.
class TriangleError(Exception):
    pass
{'fraction_non_alphanumeric': 0.10087463556851312, 'fraction_numerical': 0.006997084548104956, 'mean_word_length': 2.7467248908296944, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3679542', 'n_tokens_mistral': 604, 'n_tokens_neox': 574, 'n_words': 240}