Christmas字样，并且带有雪花图案！

上代码：
import turtle as t import random as r screen=t.Screen()
screen.screensize(bg='black') screen.setup(750,700) circle = t.Turtle ()
circle.shape ('circle') circle.color ('red') circle.speed ('fastest') circle.up
() square = t.Turtle () square.shape ('square') square.color ('green')
square.speed ('fastest') square.up () circle.goto(0,280) circle.stamp() k=0 for
i in range(1,13): y=i*30 for j in range(i-k): x=30*j square.goto(x, -y+280)
square.stamp() square.goto(-x,-y+280) square.stamp() if i%4==0: x=30*(j+1)
circle.color('red') circle.goto(-x,-y+280) circle.stamp() circle.goto(x,-y+280)
circle.stamp() k+=3 if i%4==3: x=30*(j+1) circle.color('yellow')
circle.goto(-x,-y+280) circle.stamp() circle.goto(x,-y+280) circle.stamp()
square.color('brown') for i in range(13,17): y=30*i for j in range(3): x=30*j
square.goto(x,-y+280) square.stamp() square.goto(-x,-y+280) square.stamp() def
drawsnow (): # 定义画雪花的方法 t.ht () # 隐藏笔头，ht=hideturtle t.pensize (2) # 定义笔头大小 for
i in range (200): # 画多少雪花 t.pencolor ("white") # 定义画笔颜色为白色，其实就是雪花为白色 t.pu () #

(r.randint (-100, 350)) # 定义y坐标，注意雪花一般在地上不会落下，所以不会从太小的纵座轴开始 t.pd () #

range (dens): # 就是6，那就是画5次，也就是一个雪花五角星 t.fd (int (snowsize)) t.backward (int
(snowsize)) t.right (int (360 / dens)) drawsnow () t.done()
# 平安夜 送 平安果

import turtle as t screen=t.Screen() screen.screensize(bg="white")
screen.setup(800,800) t.speed(3) t.pensize(3) t.goto(0,-200)
t.end_fill() t.color("brown") //画果实的梗 t.up() t.goto(-90,0) t.pd()
t.circle(180,40) t.seth(105) t.up() t.goto(-20,20) t.pd() t.circle(180,50)
t.pd() t.begin_fill() //左边的叶子 t.color("green") t.circle(180,50) t.seth(-30)
t.circle(180,55) t.end_fill() t.begin_fill() //右边的叶子 t.seth(0) t.circle(180,50)
t.seth(-180) t.circle(180,50) t.end_fill() t.done()

GitHub

Gitee