Commit 0f75c48a by BellCodeEditor

save project

parent c66a449e
Showing with 20 additions and 2 deletions
import turtle #导入模块
pen=turtle.Pen() #创建画笔
pen.write("Hi,\n依诺,\n你好呀!\n祝你生日快乐!",font=("Times",30,"normal"))
pen.hideturtle()
pen.pendown() #落笔
pen.pensize(5) #设置画笔大小
pen.pencolor("blue") #设置画笔颜色
pen.left(45) #设置画笔方向
#画爱心
pen.forward(100)
pen.circle(50,180)
pen.right(90)
pen.circle(50,180)
pen.forward(100)
turtle.done()
\ No newline at end of file
"""
# 利用write()帮助悟空给诺依回信吧~ # 利用write()帮助悟空给诺依回信吧~
import turtle import turtle
pen=turtle.Pen()
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light blue") screen.bgcolor("light blue")
len=screen.textinput("100","100") len=screen.textinput("100","100")
len=int(len) len=int(len)
pen=turtle.Pen() pen.write("祝你生日快乐!",font=("Times",30,"normal"))
pen.write("你好\nSB.",font=("Times",30,"normal"))
pen.hideturtle() pen.hideturtle()
len=60 len=60
pen.penup() pen.penup()
...@@ -20,3 +21,4 @@ pen.right(90) ...@@ -20,3 +21,4 @@ pen.right(90)
pen.circle(len,180) pen.circle(len,180)
pen.forward(2*len) pen.forward(2*len)
turtle.done() 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