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
  • diy1.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · d8e6b2a3
    BellCodeEditor committed 3 years ago
    d8e6b2a3
diy1.py 632 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 29 30 31 32 33 34
# 利用write()帮助悟空给诺依回信吧~
import turtle
a=turtle.Pen()
a.write("猪福语:\n诺依,你个傻*,\n滚蛋!",font=("times",30,"normal"))
a.goto(-150,0)
a.fillcolor("red")
a.begin_fill()
a.setheading(45)
a.fd(100)
a.circle(50,180)
a.right(90)
a.circle(50,180)
a.fd(100)
a.end_fill()
a.setheading(20)
def www(w):
    a.setheading(90)
    a.left(w)
    a.fd(20)
for i in range(3):
    www(20)
    www(-20)
www(20)
a.setheading(90)
a.left(-20)
a.fd(13)
a.pu()
a.goto(-150,0)
a.setheading(0)
a.shape("turtle")
a.fillcolor("green")
for i in range(500):
    a.fd(0.2)
turtle.done()