Commit 6e045c0e by BellCodeEditor

auto save

parent c66a449e
Showing with 11 additions and 21 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle import turtle
screen=turtle.Screen() #pen=turtle.Pen()
screen.bgcolor("light blue") #pen.write("嫦娥应悔偷灵药,\n碧海青天夜夜心。",font=("Times",20,"normal"))
len=screen.textinput("100","100") # CHANG E YING HUI TOU LING YAO
len=int(len) # BI HAI QING TIAN YE YE XIN
pen=turtle.Pen() p=turtle.Pen() # 创建一支画笔用来画爱心
pen.write("你好\nSB.",font=("Times",30,"normal")) p.pensize(5) # 设置画笔的大小
pen.hideturtle() p.pencolor("red") #设置画笔颜色为红色
len=60 p.left(45)
pen.penup() pen.hideturtle() # 隐藏画笔
pen.goto(100,100) turtle.done() # 保存画布
pen.pendown() \ No newline at end of file
pen.pensize(5)
pen.pencolor("red")
pen.left(45)
pen.forward(2*len)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
pen.forward(2*len)
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