以下是部分代码预览:
from turtle import * from random import randint from time import sleep color_list = ["yellow","purple","red","cyan","green","blue"] r = [1.2,1.6] screen = Screen() screen.setup(800,800) screen.bgcolor("black") screen.bgpic("background.png") screen.title("一束鲜花送情人_火树红花_作者:李兴球") t = Turtle(visible=False) # 新建海龟,先写字,再画树 t.penup() # 抬笔 t.color("white") # 画笔颜色为白色 t.setheading(90) # 朝上 t.bk(130) t.pendown() # 落笔 ................. for i in range(200): x = randint(-15,15) t.goto(x,-130) t.fd(50) t.bk(50) screen.update() screen.mainloop()
下载完整源代码与素材,请
需要浏览更多吗?
成为会员后,登陆才能继续浏览!联系微信scratch8即可办理会员。
(会员专属:能浏览所有文章,下载所有带链接的Python资源。)