def METHOD_NAME(val):
    ##computes the difficulty level 'r' (correct_answer/total_attempts) for each students and each exercise
    data = val
    r = []
    ##coverts into an array from a DataFrame
    temp =np.array(data.correct_answer)
    ##coverts into an array from a DataFrame
    temp2 = np.array(data.total_attempts)
    length = len(val)
    for i in range(length):
        if temp[i]/temp2[i] >= 0.75:
            ##assigns int 1 to r if it is >= 0.75
            r.append(1)
        else:
            ##assigns int 0 to r if it is < 0.75
            r.append(0)
    data1 = pd.DataFrame(r)
    data1 =data1.rename(columns={0:'coefficient_r'})
    result = pd.concat([val, data1], axis=1, join='inner')
    matrix = pd.DataFrame(result)
    return matrix