Commit 854013bc by BellCodeEditor

auto save

parent 34ad88ca
Showing with 90 additions and 0 deletions
import turtle
t=turtle.Pen()
s=turtle.Screen()
len=s.textinput("爱心大小:")
lovesize=int(len)
def a():
t.pencolor("yellow")
t.fillcolor("yellow")
t.begin_fill()
for i in range(5):
t.forward(15)
t.left(144)
t.end_fill()
s.bgcolor("light blue")
t.speed(50)
t.shape("turtle")
t.shapesize(2)
t.pensize(5)
t.goto(0,0)
t.pencolor("black")
t.fillcolor("red")
t.begin_fill()
t.left(45)
t.forward(2*lovesize)
t.circle(lovesize,180)
t.right(90)
t.circle(lovesize,180)
t.forward(2*lovesize)
t.end_fill()
t.penup()
t.setheading(0)
t.right(90)
t.forward(155)
t.right(90)
t.forward(300)
t.pencolor("purple")
t.pensize(3)
t.write("春江潮水连海平,海上明月共潮生。滟滟随波千万里,何处春江无月明!\n空里流霜不觉飞,汀上白沙看不见。江畔何人初见月?江月何年初照人?\n人生代代无穷已,江月年年望相似。不知江月待何人,但见长江送流水。\n白云一片去悠悠,青枫浦上不胜愁。谁家今夜扁舟子?何处相思明月楼?\n可怜楼上月裴回,应照离人妆镜台。此时相望不相闻,愿逐月华流照君。\n昨夜闲潭梦落花,可怜春半不还家。江水流春去欲尽,江潭落月复西斜。\n斜月沉沉藏海雾,碣石潇湘无限路。不知乘月几人归,落月摇情满江树",font=("Times",15,"normal"))
t.pensize(1)
t.penup()
t.goto(0,0)
t.setheading(90)
t.forward(125)
t.left(90)
t.forward(50)
t.pendown()
t.pencolor("yellow")
t.fillcolor("yellow")
t.begin_fill()
for i in range(5):
t.forward(27)
t.left(144)
t.end_fill()
t.penup()
t.goto(0,0)
t.setheading(90)
t.forward(145)
t.left(90)
t.forward(40)
t.pendown()
a()
t.penup()
t.goto(0,0)
t.setheading(90)
t.forward(130)
t.left(90)
t.forward(28)
t.pendown()
a()
t.penup()
t.goto(0,0)
t.setheading(90)
t.forward(110)
t.left(90)
t.forward(32)
t.pendown()
a()
t.penup()
t.goto(0,0)
t.setheading(90)
t.forward(98)
t.left(90)
t.forward(43)
t.pendown()
a()
t.hideturtle()
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