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

bellcode / lesson3-1-1_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-1-1_DIY1
  • diy.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    auto save · 202fa455
    BellCodeEditor committed 4 years ago
    202fa455
diy.py 513 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
import turtle
screen=turtle.Screen()
screen.bgcolor("pink")
len=screen.textinput("提示","你画的爱心多大啊")
lovesize=int(len)
pen1=turtle.Pen()
pen1.penup()
pen1.goto(100,-100)
pen1.write("送你一个小心心\n你喜欢吗?",font=("Times",15,"normal"))
pen1.hideturtle()
pen=turtle.Pen()

pen.goto(0,-50)
pen.pensize(5)
pen.pencolor("red")
pen.left(45)
pen.forward(2*lovesize)
pen.circle(lovesize,180)
pen.right(90)
pen.circle(lovesize,180)
pen.forward(2*lovesize)
turtle.done()