Pycharm画五角星

import turtle

turtle.setup(600,400,0,0)
turtle.bgcolor('red')
turtle.color('yellow')
turtle.fillcolor('yellow') def mygoto(x,y):
turtle.up()
turtle.goto(x,y)
turtle.down() def draw(l):
turtle.begin_fill()
for i in range(5):
turtle.forward(l)
turtle.right(144)
turtle.end_fill() mygoto(-250,100)
draw(100) for i in range(4):
x=1
if i in [0,3]:
x=0
mygoto(-100+x*50,150-i*47)
turtle.left(15-i*15)
draw(30) mygoto(0,0)
turtle.hideturtle()
# print(time.clock()) turtle.done()

  Pycharm画五角星

上一篇:httpclient的get带参不带参post带参不带参的简单应用


下一篇:linux read和write函数