def classesByDepartment (theDictionary, department):
    """Lists the courses being taken from specific department.

    :param dict[str, int] theDictionary: The student's class information
        with the class as the key and the number or credits as the value
    :param str department: The department in question
    :return: The courses being taken within department
    :rtype: list
    """
    department = department.upper ().strip ()
    classes = []

    for i in theDictionary:
        classDept = i.split ()[0]
        if classDept == department:
            classes.append (i)

    return classes