import matplotlib.pyplot as plt
A = []
B = []
S = 0
C = []
D = []
for i in range(500):
A.append((i+1))
B.append(((i+1)) ** -1)
S=S+((i+1)) ** -1
C.append(S)
D.append('red')
plt.bar(A, B)
plt.bar(A, C, color=D)
plt.title('(The length of life to experience)')
plt.ylabel('数量')
plt.show()
To embed this project on your website, copy the following code and paste it into your website's HTML: