标签:range style this code down 图片 class info img
import turtle angles=(0,30,60,90,120,150,180,210,240,270,300,330) colors=("blue","green","pink","purple","black","red","yellow","grey","white","beige","ivory","thistle") angles2=(0,180) def huaban(ang,color): turtle.pensize(2) turtle.color("black",color) turtle.seth(ang) turtle.right(15) turtle.pendown() turtle.begin_fill() turtle.circle(250,30) turtle.left(150) turtle.circle(250,30) turtle.end_fill() turtle.penup() def yezi(ang): turtle.pensize(2) turtle.color("black","green") turtle.seth(ang) turtle.right(15) turtle.pendown() turtle.begin_fill() turtle.circle(120,60) turtle.left(120) turtle.circle(120,60) turtle.end_fill() turtle.penup() def main(): turtle.setup(500,800) turtle.penup() turtle.seth(90) turtle.fd(200) turtle.speed(0) for i in range(12): huaban(angles[i],colors[i]) turtle.seth(270) turtle.pendown() turtle.fd(200) for j in range(2): yezi(angles2[j]) turtle.seth(270) turtle.pendown() turtle.fd(200) main()
标签:range style this code down 图片 class info img
原文地址:https://www.cnblogs.com/knightwen/p/8799131.html