"""
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()
python 绘制奥运五环
最新推荐文章于 2024-06-03 20:47:37 发布