def create_plot_data(f, xmin, xmax, n):
    """
    Computes and returns values of y = f(x).

    f -- function of x
    xmin -- minimum value of x
    xmax -- maximum value of x
    n -- number of values of x

    returns values of x and y
    """
    xs = []
    ys = []
    for i in range(n):
        xi = xmin + float(i) * (xmax - xmin) / (n - 1)
        yi = f(xi)
        xs.append(xi)
        ys.append(yi)
    return (xs, ys)