def euler(step, y0):
    """
    Implements Euler's method for the differential equation dy/dx = 1/(2(y-1)) on the interval [0,4]
    """
    x = [0]
    index_x = 0
    while x[index_x] < 4:
        x.append(x[index_x] + step)
        index_x += 1
    index_y = 0
    y = [y0]
    def yprime(y):
        yprime = 1 / (2 * (y - 1))
        return yprime
    while index_y < index_x:
        y.append(y[index_y] + step * yprime(y[index_y]))
        index_y += 1
    return x, y