时间:2021-07-01 10:21:17 帮助过:512人阅读
python绘图四叶草
import turtle def draw_shapes(): window = turtle.Screen() window.bgcolor("red") flower = turtle.Turtle() flower.speed(10) flower.shape("arrow") flower.right(45) for i in range(1,37): for j in range(1,5): draw_circle(flower,i,"green") flower.left(90) flower.right(45) flower.color("green") flower.forward(500) window.exitonclick() def draw_circle(circle,radius,color): circle.color(color) circle.circle(radius) draw_shapes()
效果图:
众多python培训视频,尽在python学习网,欢迎在线学习!
以上就是python绘图四叶草的详细内容,更多请关注Gxlcms其它相关文章!