Commit 18a7406b by BellCodeEditor

auto save

parent 6b77276d
Showing with 148 additions and 23 deletions
import turtle
a1=turtle.Pen()#用来画桃心
a2=turtle.Pen()#
b=turtle.Screen()
b.bgcolor("light yellow")
c=b.textinput("提示","你想要大多的爱心")
r=int(c)
a1.pencolor("purple")
a2.pencolor("purple")
a1.hideturtle()
a1.penup()
a1.goto(0,90)
a1.pendown()
a1.left(45)
a1.forward(2*r)
a1.circle(r,180)
a1.right(90)
a1.circle(r,180)
a1.forward(2*r)
a2.penup()
a2.goto(-120,0)
a2.write("恭贺新禧",font=("times",50,"normal"))
turtle.done()
from turtle import *
from random import *
bgcolor("#a1270F")
pencolor("red")
penup()
goto(-180,-210)
pendown()
write("Merry Christmas",font=("Arial",39))
textinput("提示!","你有一份圣诞礼物请查收!")
bgcolor("#F9DDF4")
a=numinput("提示!", "你想要多大的爱心?")
r=int(a)
colors=["blue","green","orange","yellow","pink"]
a=window_width()
b=window_height()
pensize(2)
hideturtle()
penup()
for i in range(40):
m=randint(0,4)
pencolor(colors[m])
x=randint(-a//2,b//2)
y=randint(-b//2,a//2)
penup()
goto(x,y)
pendown()
speed(0)
forward(2*r)
circle(r,180)
right(90)
circle(r,180)
forward(2*r)
penup()
goto(0,0)
bgcolor("#114552")
pencolor("red")
fillcolor("red")
begin_fill()
goto(-50,-150)
goto(50,-150)
goto(0,0)
end_fill()
pencolor("white")
fillcolor("white")
begin_fill()
circle(10)
end_fill()
penup()
goto(-50,-150)
pendown()
pensize(20)
forward(100)
pencolor("white")
penup()
goto(-220,70)
write(chr(10053),font=("Arial",50))
penup()
goto(220,-70)
write(chr(10053),font=("Arial",50))
penup()
goto(-350,-250)
write(chr(9924),font=("Arial",100))
penup()
pencolor("pink")
goto(-220,150)
write("世上本就没有圣诞老人\n所有的礼物和惊喜都来自爱你的人",font=("Arial",18))
penup()
goto(180,-150)
pencolor("white")
write("皮兴文\n工业设计(专升本)\n2021年11月28日",font=("Arial",18))
done()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment