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 · 6cdc13cd
    BellCodeEditor committed a year ago
    6cdc13cd
diy1.py 574 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
import turtle
a=turtle.textinput("爱心","大小是多少:")
b=int(a)
turtle.bgcolor("skyblue")
turtle.hideturtle()
turtle.color("red")
turtle.pensize(10)
turtle.speed(0)
turtle.begin_fill()
turtle.left(45)
turtle.forward(2*b)
turtle.circle(b,180)
turtle.right(90)
turtle.circle(b,180)
turtle.forward(2*b)
turtle.end_fill()
turtle.color("black")
turtle.penup()
turtle.goto(125,-250)
turtle.pendown()
turtle.write("Hi,诺伊~\n用python写电子贺卡真是太有趣啦~\n我也喜欢python~\n———悟空",font=("times",16,"normal"))
turtle.done()