Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

bellcode / lesson2-5_DIY1

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • lesson2-5_DIY1
  • n.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · 162cac1f
    BellCodeEditor committed 3 years ago
    162cac1f
n.py 706 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
import turtle 
s=turtle.Screen()
len=s.textinput("提示","你想要的爱心多大呀?")
lovesize=int(len)
lovesize=float(len)
s.bgcolor("light pink")
pen=turtle.Pen()
pen.penup()
pen.goto(100,-100)
pen.write("沐浴在夕阳下\n一轮暖阳,两个身影\n目光是同一个方向\n人间值得,有你真好!",font=("方正硬笔楷书简体",18,"normal"))
pen.hideturtle()
p1=turtle.Pen()
p1.pensize(5)
p1.pencolor("red")
p1.fillcolor("red")
p1.begin_fill()
p1.left(45)
p1.forward(lovesize)
p1.circle(2*lovesize,180)
p1.right(90)
p1.circle(lovesize,180)
p1.forward(2*lovesize)
# p1.penup()
# p1.goto(70,0)
# p1.circle(3,360)
p1.end_fill()
p1.hideturtle()
turtle.done()