python turtle库-读书笔记
1 import turtle 2 turtle.setup(800,400,200,200) 3 turtle.pensize(2) 4 turtle.fillcolor("red") 5 turtle.begin_fill() 6 turtle.fd(180) 7 turtle.seth(-144) 8 turtle.fd(180) 9 turtle.seth(72) 10 turtle.fd(180) 11 turtle.seth(-72) 12 turtle.fd(180) 13 turtle.seth(144) 14 turtle.fd(180) 15 turtle.end_fill() 16 turtle.seth(72) 17 import math 18 n=90/math.sin(2/5*math.pi) 19 turtle.circle(-n,360)
学以致用