猫史档案馆


【Python作品分享】python入门第二次作品 图表【教程贴】

用户:鸽子ECYRAZ鸽子ECYRAZ查看:0 回复:0 评论:0 创建时间:2019-07-09T15:38:40


【作品展示】

center_image

 

【作品介绍】

自己看代码,能看多少看多少

 

【作品源代码】

import random as m
import matplotlib.pyplot as s


# 输入数据
a = int(input('请输入一个整数'))
b = int(input('如上'))
c = int(input('如上'))
d = int(input('如上'))
e = float(input('请输入一个小数'))

# 生成固定数据
x = [1, 2, 3, 4, 5]
y = [a, b, c, d, e]

# 生成图像
s.bar(x,y)

# 显示图像
s.show()

print('呵呵')

# 关闭图像
s.close()

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页