Python:一个好用的在线python编程网站
(2018-12-13 14:14:58)| 分类: 信息技术研究 |
https://repl.it/
以上这个网站可以在线写python程序,还支持绘图,范例如下:
//绘100个随机增长【-10,10】的点
import matplotlib.pyplot as plt
from random import randint
fig =
plt.figure(figsize=(10, 8))
ax =
fig.add_subplot(212)
points = []
last = 0
bound = 10
for i in range(0, 100):
last += randint(-bound,
bound)
points.append(last)
ax.plot(points)
fig.savefig('g2.png')
//要看到绘图,必须有这句,文件名字随意
前一篇:STM32:通用定时器编程

加载中…