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

bellcode / lesson3-4-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-4-1_DIY1
  • diy1.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · 9aba8e4d
    BellCodeEditor committed 3 years ago
    9aba8e4d
diy1.py 664 Bytes
Edit
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 35 36 37 38
# 利用write()帮助悟空给诺依回信吧
import turtle
turtle.colormode(255)

s = turtle.Screen()
s.bgcolor((238,130,238))

pen1=turtle.Pen()
pen1.up()
pen1.goto(-100,-100)
pen1.write("诺伊,\nturtle真好用,\n我都会用turtle写字了!",font=("仿宋",20,"normal"))

pen1.hideturtle()
turtle.colormode(255)
pen2=turtle.Pen()
pen2.up()
pen2.goto(-39,12)
pen2.down()
pen2.pensize(5)







def huayuan(b):
    pen2.pencolor(100,130,238)
    pen2.setheading(45)
    pen2.forward(b)
    pen2.circle(b/2,180)
    pen2.right(90)
    pen2.circle(b/2,180)
    pen2.forward(b)
    pen2.hideturtle()

huayuan(200)
turtle.done()