Commit 4726c18b by BellCodeEditor

auto save

parent 999f118c
Showing with 105 additions and 0 deletions
import turtle as t
t.speed(20)#设置速度
#绘制右边红色矩形
t.penup()#抬笔
t.goto(95,150)#移动到位置
t.pendown()#落笔
t.color("red","red")#画笔颜色
t.begin_fill()#开始填充
for a in range(2):#重复执行2次
t.forward(60)#移动60步
t.right(90)#右转90度
t.forward(400)#移动400步
t.right(90)#右转90度
t.end_fill()#结束填充
#在右边矩形上写字
t.penup()#抬笔
t.goto(100,-250)#移动到位置
t.pendown()#落笔
t.color("black")#画笔颜色
t.write("一\n\n\n\n\n\n好",font=("华文行楷",42))#设置所写内容
#绘制左边红色矩形
t.penup()#抬笔
t.goto(-155,150)#移动到位置
t.pendown()#落笔
t.color("red","red")#画笔颜色
t.begin_fill()#开始填充
for a in range(2):#重复执行2次
t.forward(60)#移动60步
t.right(90)#右转90度
t.forward(400)#移动400步
t.right(90)#右转90度
t.end_fill()#结束填充
#在左边矩形上写字
t.penup()#抬笔
t.goto(-150,-250)#移动到位置
t.pendown()#落笔
t.color("black")#画笔颜色
t.write("万\n\n\n\n\n\n高",font=("华文行楷",42))#设置所写内容
#绘制横批矩形
t.penup()#抬笔
t.goto(-100,190)#移动到位置
t.pendown()#落笔
t.color("red","red")#画笔颜色
t.begin_fill()#开始填充
for a in range(2):#重复执行2次
t.forward(210)#移动210步
t.left(90)#左转90度
t.forward(60)#移动60步
t.left(90)#左转90度
t.end_fill()#结束填充
#在横批矩形上写字
t.color("black")#画笔颜色
t.write("五福临门",font=("华文行楷",40))#设置所写内容
t.penup()
t.goto(0,0)
t.pendown()
t.color("red","red")
t.begin_fill()
t.left(45)
t.forward(80)
t.left(90)
t.forward(80)
t.left(90)
t.forward(80)
t.left(90)
t.forward(80)
t.end_fill()
t.pencolor("black")
t.goto(-25,25)
t.write("福",font=("华文楷体",40))
t.hideturtle()#隐藏画笔
t.done()#保存画布
\ No newline at end of file
import turtle
screen=turtle.Screen()
screen.bgcolor("pink")
pen=turtle.Pen()
pen.penup()
pen.goto(50,-100)
pen.write("你好诺依\n我会在电脑上写字了",font=("Times",15,"normal"))
pen.hideturtle()
len=60
pen1=turtle.Pen()
pen1.pensize(5)
len=screen.textinput("提示","你想要多大的爱心?")
lovesize=int(len)
pen1.pencolor("red")
pen1.left(45)
pen1.forward(2*lovesize)
pen1.circle(lovesize,180)
pen1.right(90)
pen1.circle(lovesize,180)
pen1.forward(2*lovesize)
pen1.hideturtle()
turtle.done()
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