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

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

auto save

parent 2a0107ec
Hide whitespace changes
Inline Side-by-side
Showing with 5 additions and 2 deletions
  • 1.py
1.py
View file @ dec701b6
...@@ -5,8 +5,11 @@ pen=turtle.Pen() ...@@ -5,8 +5,11 @@ pen=turtle.Pen()
pen.pendown() pen.pendown()
pen.pencolor("red") pen.pencolor("red")
pen.pensize(1) pen.pensize(1)
screen = turtle.Screen()
len1=screen.textinput("提示","你想输入多大的爱心")
len1=int(len1)
len1=50 pen.speed(100)
for i in range(10): for i in range(10):
pen.left(45) pen.left(45)
pen.fd(2*len1) pen.fd(2*len1)
...@@ -26,5 +29,5 @@ pen.pencolor("black") ...@@ -26,5 +29,5 @@ pen.pencolor("black")
pen.write("Hi,诺依~\n用python写电子贺卡真是太有趣啦~\n我也喜欢python~\n——悟空 ",font=("Times",10,"normal")) pen.write("Hi,诺依~\n用python写电子贺卡真是太有趣啦~\n我也喜欢python~\n——悟空 ",font=("Times",10,"normal"))
pen.hideturtle() pen.hideturtle()
turtle.done() 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