标签:for 同心圆 port rtl forward imp 一个 fill nbsp
1画一组同切圆
import turtle
turtle.circle(10)
turtle.circle(20)
turtle.circle(30)
2画一组同心圆
import turtle
turtle.circle(20)
turtle.up()
turtle.goto(0,-20)
turtle.down()
turtle.circle(40)
turtle.up()
turtle.goto(0,-40)
turtle.down()
turtle.circle(60)
3画一个五角星
import turtle
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
4画一个黄色实心五角星
import turtle
turtle.bgcolor(‘red‘)
turtle.color(‘yellow‘)
turtle.fillcolor(‘yellow‘)
turtle.begin_fill()
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.end_fill()
标签:for 同心圆 port rtl forward imp 一个 fill nbsp
原文地址:http://www.cnblogs.com/honghui/p/7493074.html