Commit b6bc4b28 by BellCodeEditor

save project

parent 169bf176
Showing with 11 additions and 6 deletions
#利用write()帮助悟空给诺依回信吧~
import turtle
import random
#创建画笔
pen = turtle.Pen()
screen=turtle.Screen()
list=["green","blue","gold","pink","black","red"]
screen.bgcolor(random.choice(list))
size=int(screen.textinput("aaa","大小"))
#写字
pen.write(' 《红豆》\n红豆生南国,\n春来发几枝。\n愿君多采撷,\n此物最相思。',font=('黑体',30,'normal'))
pen.penup()
pen.goto(-100,0)
pen.pendown()
pen.color("gold")
pen.color(random.choice(list))
pen.pensize(3)
pen.fillcolor("red")
pen.fillcolor(random.choice(list))
pen.begin_fill()
pen.lt(45)
pen.fd(100)
pen.circle(50,180)
pen.fd(size*2)
pen.circle(size,180)
pen.right(90)
pen.circle(50,180)
pen.fd(100)
pen.circle(size,180)
pen.fd(size*2)
pen.end_fill()
pen.hideturtle()
#保存画布
......
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