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

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

auto save

parent f2b8c09b
Show whitespace changes
Inline Side-by-side
Showing with 7 additions and 2 deletions
  • diy1.py
diy1.py
View file @ 3092a33a
import turtle import turtle
int(len)
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light blue") screen.bgcolor("light blue")
pen1=turtle.Pen() pen1=turtle.Pen()
...@@ -14,8 +15,10 @@ pen.pensize(15) ...@@ -14,8 +15,10 @@ pen.pensize(15)
pen.fillcolor("red") pen.fillcolor("red")
#开始填充 #开始填充
pen.begin_fill()
len=60 size=int(turtle.testinput("提示2","你想画多大的爱心呢?"))
def love(len)
pen.left(45) pen.left(45)
pen.circle(len,180) pen.circle(len,180)
pen.right(90) pen.right(90)
...@@ -23,6 +26,8 @@ pen.circle(len,180) ...@@ -23,6 +26,8 @@ pen.circle(len,180)
pen.forward(2*len) pen.forward(2*len)
pen.left(90) pen.left(90)
pen.forward(2*len) pen.forward(2*len)
pen.begin_fill()
pen.end_fill() pen.end_fill()
......
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