"""本程序模拟雪花下雪效果,有一个漂亮的序幕,窗口会越放越大...""" from turtle import * from time import sleep def make_snow_shape(length): """定义米字型的形状,然后注册到形状列表""" turtle = Turtle(visible=False ) turtle.begin_poly() for i in range(8): turtle.fd(length) turtle.bk(length) turtle.right(45) turtle.end_poly() p = turtle.get_poly() turtle.screen.addshape("snow",p) turtle.clear() screen = Screen() screen.title("冰雪奇缘_雪花飞舞_by_www.lixingqiu.com") screen.delay(0) make_snow_shape(5) # 定义雪花形状 screen.setup(width,height) screen.bgcolor("black")需要浏览更多吗?
成为会员后,登陆才能继续浏览!联系微信scratch8即可办理会员。
(会员专属:能浏览所有文章,下载所有带链接的Python资源。)
李兴球
李兴球的博客是Python创意编程原创博客