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

auto save

parent 7f29246c
Show whitespace changes
Inline Side-by-side
Showing with 21 additions and 1 deletions
  • diy1.py
diy1.py
View file @ 4c65583d
# 利用write()帮助悟空给诺依回信吧~
import turtle
screen=turtle.Screen()
screen.bgcolor("light green")
pen=turtle.Pen()
pen.write(" 春晓\n春明不觉晓\n处处闻啼鸟\n夜来风雨声\n花落知多少",font=("Times",40,"normal"))
pen.penup()
pen.goto(-100,-300)
pen.write(" 春晓\n春明不觉晓\n处处闻啼鸟\n夜来风雨声\n花落知多少",font=("Times",20,"normal"))
pen.hideturtle()
p=turtle.Pen()
len=screen.textinput("提示","请输入爱心的大小")
l=int(len)
len=20
p.pensize(5)
p.pencolor("blue")
p.fillcolor("red")
p.begin_fill()
p.left(45)
p.forward(2*l)
p.circle(l,180)
p.right(90)
p.circle(l,180)
p.forward(2*l)
p.end_fill()
p.hideturtle()
turtle.done()
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