import numpy as np import matplotlib.pyplot as plt def f(z): n = 30 result = 0 for i in range(n): d = np.abs(1 / (n ** z)) ** 2 result += d return result if __name__ == '__main__': x = np.linspace(-1, 8, 90) y = [f(i) for i in x] print(y) plt.plot(x, y) plt.show()