为您找到相关结果623,154个
turtle的基础使用之python turtle递归绘图_python_脚本之家
startx 如果为正,则从屏幕左边缘开始以像素为单位,如果从右边缘为负,如果没有,则水平居中窗口 starty如果为正,则从屏幕上边缘开始以像素为单位,如果为负,则从下边缘开始,如果没有,则垂直居中窗口turtle.title 设置海龟窗口的标题2 turtle.screensize(canvwidth=None, canvheight=None, bg=None),以像素为单位的...
www.jb51.net/article/2381...htm 2025-2-3
python 用matplotlib绘制折线图详情_python_脚本之家
y_view = [random.randint(50,200) for i in range(30)]展示10月份数据折线图: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 import matplotlib.pyplot as plt import random plt.rcParams["font.sans-serif"]=['SimHei'] plt.rcParams["axes.unicode_minus"]=False x_data ...
www.jb51.net/article/2308...htm 2025-1-19
Python使用海龟绘图实现贪吃蛇游戏_python_脚本之家
defchange(x, y):# 改变蛇的移动方向 position.x=x position.y=y defis_inside(head):# 判断蛇头是否在窗体内 return-200< head.x <190and-200< head.y <190 defmove():# 可以让蛇移动的方法 head=snake[-1].copy()# 确定蛇头的位置
www.jb51.net/article/2151...htm 2025-2-4