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
  • diy1.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · 0883fcc7
    BellCodeEditor committed 4 years ago
    0883fcc7
diy1.py 432 Bytes
Edit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

import turtle
penl=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("light yellow")
pen=turtle.Pen()
pen.penup()
pen.goto(-100,-100)
pen.write("hi",font=("Times",50,"normal"))
len=100
penl.pencolor("red")
penl.pensize(5)

len=int(screen.textinput("大小","输入爱心大小11"))
penl.left(45)
penl.forward(2*len)
penl.circle(len,180)
penl.right(90)
penl.circle(len,180)
penl.forward(2*len)
turtle.done()