Commit b6bc4b28 by BellCodeEditor

save project

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