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
Commit ada5d339 authored 4 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

auto save

parent c2f1308f
Show whitespace changes
Inline Side-by-side
Showing with 34 additions and 2 deletions
  • diy1.py
diy1.py
View file @ ada5d339
# 利用write()帮助悟空给诺依回信吧~ import turtle
\ No newline at end of file
def love(len):
pen.left(45)
pen.forward(2*len)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
pen.forward(2*len)
screen = turtle.Screen()
screen.bgcolor("light blue")
pen = turtle.Pen()
pen.color("red")
pen.pensize(5)
# 画爱心
size = float(screen.textinput("提示2","你想画多大的爱心呢?"))
pen.fillcolor("red")
pen.begin_fill()
love(size)
pen.end_fill()
pen.hideturtle()
# 写文字
pen1 = turtle.Pen()
pen1.pencolor("purple")
pen1.penup()
pen1.goto(-100,-100)
text = screen.textinput("提示2","你想写点什么?")
pen1.write(text,font=("Times",18,"normal"))
pen1.hideturtle()
turtle.done()
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment