Commit c3bd1bbf by BellCodeEditor

auto save

parent 3385641b
Showing with 45 additions and 1 deletions
......@@ -7,7 +7,7 @@ len = int(len)
pen.up()
pen.setheading(-90)
pen.forward(100)
pen.write("你好呀\n 小张",font=("Times",30,"normal"))
pen.write("你好呀\n 小张",font=("宋体",30,"normal"))
pen.setheading(90)
pen.forward(200)
pen.down()
......
# import turtle
# pen = turtle.Pen()
# screen = turtle.Screen()
# len = screen.textinput("提示","输入你想画爱心的大小")
# len = int(len)
# pen.showturtle()
# pen=turtle.Pen()
# pen.write("你好呀,张三",font=("Times",'13',"normal"))
# turtle.done()
import turtle
import random
pen = turtle.Pen()
screen = turtle.Screen()
screen.bgcolor("light blue")
len_1 = screen.textinput("提示","你图案的大小")
len = int(len_1)
# len = 100 # 代表圆的半径
pen.up()
pen.goto(100,-260)
pen.write("你好啊,\n张三,\n最近吃的好么?",font=("宋体",30,"normal"))
pen.goto(0,0)
pen.down()
pen.hideturtle()
pen.pensize(10)
pen.pencolor("red")
pen.speed(100)
for i in range(10):
pen.left(45)
pen.forward(2*len)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
pen.forward(2*len)
pen.right(36)
turtle.done()
\ No newline at end of file
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