Commit 67db189e by BellCodeEditor

save project

parent d304e645
Showing with 4 additions and 4 deletions
# 利用write()帮助悟空
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("green") l=screen.textinput("大小","输入数字")
pen=turtle.Pen() pen=turtle.Pen()
len=100 len=int(l)
pen.penup() pen.penup()
pen.goto(100,-100) textpen.goto(100,-100)
pen.write("你好,贾维斯?",font=("Times",13,"normal")) pen.write("你好,贾维斯?",font=("Times",13,"normal"))
pen.goto(0,0) pen.goto(0,0)
pen.pendown() pen.pendown()
...@@ -19,3 +18,4 @@ pen.circle(len,180) ...@@ -19,3 +18,4 @@ pen.circle(len,180)
pen.forward(2*len) pen.forward(2*len)
pen.hideturtle() pen.hideturtle()
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