<commit_before>#!/usr/bin/env python

""" Assignment 1, Exercise 2, INF1340, Fall, 2015. Name that shape.

This module contains one function name_that_shape(). It prompts the user
to input the number of sides in a shape and outputs the name of the shape.

"""

__author__ = '<NAME>'
__email__ = "<EMAIL>"
__copyright__ = "2015 Susan Sim"
__license__ = "MIT License"


def name_that_shape():
    """
    For a given number of sides in a regular polygon, returns the shape name

    Inputs: number of sides must be >= 3 but <= 10

    Expected Outputs: name of the shape

    Errors: if input is anything else, display "Error"

    """
    sides = input("Number of sides in a regular polygon: ")

    if sides == 3:
        print("Triangle")
    elif sides == 4:
        print("Quadrilateral")
    elif sides == 5:
        print("Pentagon")
    elif sides == 6:
        print("Hexagon")
    else:
        print("Error")

    return

name_that_shape()<commit_msg>Completed exercise 2<commit_after>#!/usr/bin/env python

""" Assignment 1, Exercise 2, INF1340, Fall, 2015. Name that shape.

This module contains one function name_that_shape(). It prompts the user
to input the number of sides in a shape and outputs the name of the shape.

"""

__author__ = '<NAME>'
__email__ = "<EMAIL>"
__copyright__ = "2015 S<NAME>"
__license__ = "MIT License"


def name_that_shape():
    """
    For a given number of sides in a regular polygon, returns the shape name

    Inputs: number of sides must be >= 3 but <= 10

    Expected Outputs: name of the shape

    Errors: if input is anything else, display "Error"

    """
    sides = input("Number of sides in a regular polygon: ")

    if sides == 3:
        print("Triangle")
    elif sides == 4:
        print("Quadrilateral")
    elif sides == 5:
        print("Pentagon")
    elif sides == 6:
        print("Hexagon")
    elif sides == 7:
        print("Heptagon")
    elif sides == 8:
        print("Octagon")
    elif sides == 9:
        print("Nonagon")
    elif sides == 10:
        print("Decagon")
    else:
        print("Error")

    return

name_that_shape()
{'fraction_non_alphanumeric': 0.10990052108005685, 'fraction_numerical': 0.022738038844149693, 'mean_word_length': 2.7985611510791366, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '3542974', 'n_tokens_mistral': 691, 'n_tokens_neox': 620, 'n_words': 248}