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 · c75332cc
    BellCodeEditor committed a year ago
    c75332cc
diy1.py 716 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
# 利用write()帮助悟空给诺依回信吧~
import turtle
screen=turtle.Screen()
screen.bgcolor("light blue")
x=screen.textinput("爱心值","你好啊,你想要多大的爱心啊")
a=screen.textinput("爱心色","你好啊,你想要什么颜色的爱心啊")
m=screen.textinput("爱心色","你好啊,你想要写下什么啊")
x=int(x)
pen=turtle.Pen()
pen2=turtle.Pen()
pen2.penup()
pen2.goto(100,100)
pen2.pendown()
pen2.write(m,font = ("Time",20,"normal"))
pen2.pensize(7)
pen.hideturtle()
pen.penup()
pen.goto(0,-20)
pen.pendown()
pen.pensize(7)
pen.pencolor(a)
pen.left(45)
pen.forward(2*x)
pen.circle(x,180)
pen.right(90)
pen.circle(x,180)
pen.forward(2*x)
turtle.done()