# -*- coding: utf-8 -*-
"""
Created on Sun Dec 22 11:28:38 2019
@author: han
"""
import numpy as np
import matplotlib.pyplot as plt
import warnings
el=np.random.randint(1,10,100)
y=[]
cl=np.random.randint(1,10,100)
x = np.linspace(10,100,10,dtype=int)
print(x)
for i in x:
print(i)
sum=0
for j in range(i):
sum = sum+(cl[j]*el[j])/100
# print(sum)
y.append(sum);
print(y)
plt.plot(x,y,color='blue',linestyle='-')
plt.title('Handsome Programmers picture')
来源:CSDN
作者:handsome programmer
链接:https://blog.csdn.net/qq_36444039/article/details/103654373