
    Create a function that analyzes a student's written response by determining the total number of possible word patterns (non-empty substrings) within their text submission. This linguistic analysis helps assess the complexity of student responses and aids in customizing future learning materials to match their comprehension level.
    

    
def number_of_substrings(str):
    """
    Create a function that analyzes a student's written response by determining the total number of possible word patterns (non-empty substrings) within their text submission. This linguistic analysis helps assess the complexity of student responses and aids in customizing future learning materials to match their comprehension level.
    

    """
def number_of_substrings(str):
    """
    Create a function that analyzes a student's written response by determining the total number of possible word patterns (non-empty substrings) within their text submission. This linguistic analysis helps assess the complexity of student responses and aids in customizing future learning materials to match their comprehension level.
    

    """
    str_len = len(str)
    return int(str_len * (str_len + 1) / 2)