python turtle库的学习笔记---太阳花

 1 import turtle
 2 import time
 3    
 4 # 同时设置pencolor=color1, fillcolor=color2
 5 turtle.color("red", "yellow")
 6    
 7 turtle.begin_fill()
 8 for i in range(50):
 9     turtle.forward(200)
10     turtle.left(170)
11 turtle.end_fill()
12    
13 turtle.mainloop()

posted @ 2020-09-21 14:03  山自山  阅读(167)  评论(0编辑  收藏  举报