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.exitoncpck()
def draw_circle(circle,radius,color):
circle.color(color)
circle.circle(radius)
draw_shapes()
效果图:
众多python培训视频,尽在python学习网,欢迎在线学习!
以上就是小编分享的关于python绘图四叶草的详细内容希望对大家有所帮助,更多有关python教程请关注环球青藤其它相关文章!