def add_column(state, new_name, new_perfect_grade, new_weight, values):
    """ Return state with new column added. """
    new_state = state.copy()
    new_state.names.append(new_name)
    new_state.perfect_grades.append(new_perfect_grade)
    new_state.weights.append(new_weight)
    new_state.n_col += 1
    new_state.columns = list(range(new_state.n_col))
    for stu in state.students:
        new_state.data[stu].append(values[stu])
    return new_state