Commit 9dd405e1 by BellCodeEditor

save project

parent ab4a1305
Showing with 16 additions and 7 deletions
# 利用write()帮助悟空给诺依回信吧~ # 利用write()帮助悟空给诺依回信吧~
import turtle import turtle
pen=turtle.Pen() pen=turtle.Pen()
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("green") screen.bgcolor("green")
pen.penup() pen.penup()
...@@ -8,13 +9,18 @@ pen.goto(100,-100) ...@@ -8,13 +9,18 @@ pen.goto(100,-100)
pen.write("你好啊,\n我会用python写贺卡",font=("Times",13,"normal")) pen.write("你好啊,\n我会用python写贺卡",font=("Times",13,"normal"))
pen1=turtle.Pen() pen1=turtle.Pen()
pen1.pencolor("red") pen1.pencolor("red")
fen=60 len=screen.textinput("爱心","请输入爱心尺寸")
len1=int(len)
pen1.pensize(5) pen1.pensize(5)
pen1.left(45) pen1.left(45)
pen1.forward(2*fen) pen1.forward(2*len1)
pen1.circle(fen,180) pen1.circle(len1,180)
pen1.right(90) pen1.right(90)
pen1.circle(fen,180) pen1.circle(len1,180)
pen1.forward(2*fen) pen1.forward(2*len1)
pen1.hideturtle() pen1.hideturtle()
turtle.done() turtle.done()
\ No newline at end of file import turtle
screen=turtle.Screen()
screen.textinput("lll","wqqq")
turtle.done()
import turtle
screen=turtle.Screen()
screen.textinput("lll","wqqq")
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