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

bellcode / lesson3-5-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-5-1_DIY1
  • diy1.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · f0b510a9
    BellCodeEditor committed 4 years ago
    f0b510a9
diy1.py 585 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
# 利用write()帮助悟空给诺依回信吧~
import turtle
screen=turtle.Screen()
len=screen.textinput("大小","请输入:")
len=int(len)
pen=turtle.Pen()
screen.bgcolor("red")
pen.penup()
pen.goto(100,-100)
pen.write("丑\n八\n怪",font=("宋体","50","italic"))
pen.hideturtle()
pen.pendown()
pen=turtle.Pen()
pen.pensize(5)
pen.pencolor("yellow")
pen.fillcolor("yellow")
pen.goto(0,0)
pen.begin_fill()
pen.left(45)
pen.forward(len*2)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
pen.forward(len*2)
pen.end_fill()
pen.hideturtle()
turtle.done()