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

bellcode / lesson3-2_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
  • lesson3-2_DIY1
  • 1.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · 81cd15c0
    BellCodeEditor committed a year ago
    81cd15c0
1.py 372 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import turtle as t 
t.bgcolor("pink")
r=eval(t.textinput("提示","请输入爱心大小"))
t.color('red')
t.pensize(5)
t.begin_fill()
t.left(45)
t.forward(r*2)
t.circle(r,180)
t.right(90)
t.circle(r,180)
t.forward(2*r)
t.end_fill()

t.up()
t.goto(-100,-50)
t.write("你好呀!诺一",font=("times",30,'normal'))
t.hideturtle()
t.done()
t.hideturtle()