"""
author:魏振东
data:2019.09.30
func:绘制奥运五环北京欢迎你
"""
import turtle
as t
def Skip(t
,x
,y
):
t
.penup
()
t
.goto
(x
,y
)
t
.pendown
()
def draw(t
,x
,y
,z
):
t
.pencolor
(z
)
Skip
(t
,x
,y
)
t
.circle
(150)
"""画笔基础设置"""
t
.screensize
(1200,800)
t
.pensize
(15)
t
.hideturtle
()
t
.speed
(10)
draw
(t
,-350,0,"black")
Skip
(t
,-315,100)
t
.write
("北", align
="right", font
=("楷体",70 , "bold"))
draw
(t
,-180,-180,"yellow")
Skip
(t
,-135,-100)
t
.write
("京", align
="right", font
=("楷体",70 , "bold"))
draw
(t
,0,0,"red")
Skip
(t
,50,100)
t
.write
("欢", align
="right", font
=("楷体",70 , "bold"))
draw
(t
,180,-180,"green")
Skip
(t
,230,-100)
t
.write
("迎", align
="right", font
=("楷体",70 , "bold"))
draw
(t
,350,0,"blue")
Skip
(t
,400,100)
t
.write
("您", align
="right", font
=("楷体",70 , "bold"))
t
.done
()
转载请注明原文地址: https://mac.8miu.com/read-55221.html