python基础

from turtle import *
import turtle
import sys

def my_draw(n):
    turtle.begin_fill()
    for i in range(5):
        turtle.forward(n)
        turtle.right(144)
    turtle.end_fill()

def myongo(x,y):
     turtle.up()
     turtle.goto(x,y)
     turtle.down()

turtle.bgcolor('red')
turtle.color('yellow')
turtle.fillcolor('yellow')
turtle.setup(600,400,120,120)
turtle.hideturtle()


myongo(-250,75)
my_draw(80)

myongo(-140,150)
my_draw(30)

myongo(-110,100)
my_draw(30)

myongo(-110,40)
my_draw(30)

myongo(-140,-10)
my_draw(30)

turtle.done()

 

 

posted on 2018-03-14 20:34  阿丹丹酱  阅读(111)  评论(0编辑  收藏  举报

导航