Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-2_DIY1
This project
Loading...
Sign in
Toggle navigation
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
a02a1b30
authored
May 21, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
b5a13ff6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
24 deletions
diy1.py
diy1.py
View file @
a02a1b30
# 利用write()帮助悟空给诺依回信吧~
import
turtle
# import turtle
# screen=turtle.Screen()
# screen.bgcolor("light blue")
# len=screen.textinput("100","100")
# len=int(len)
# pen=turtle.Pen()
# pen.write("减肥\nSB.",font=("Times",30,"normal"))
# pen.hideturtle()
# len=60en.penup()
# # pen.goto(100,100)
# # pen.pendown()
# # pen.pensize(5)
# # pen.pencolor("red")
# # pen.left(45)
# # pen.forward(2*len)
# # pen.circle(len,180)
# # pen.right(90)
# pen.circle(len,180)
# pen.forward
import
turtle
pen
=
turtle
.
Pen
()
pen
=
turtle
.
Pen
()
pen
.
circle
(
50
)
screen
=
turtle
.
Screen
()
turtle
.
done
screen
.
bgcolor
(
"light blue"
)
Pen
pen2
=
turtle
.
Pen
()
pen2
.
penup
()
def
draw
():
pen
.
fillcolor
(
"red"
)
pen
.
begin_fill
()
pen
.
pensize
(
10
)
pen
.
pencolor
(
"red"
)
pen
.
left
(
45
)
pen
.
forward
(
100
)
pen
.
circle
(
50
,
180
)
pen
.
right
(
90
)
pen
.
circle
(
50
,
180
)
pen
.
forward
(
100
)
pen
.
end_fill
()
pen
.
hideturtle
()
pen2
.
goto
(
150
,
-
100
)
def
writer
():
pen2
.
pencolor
(
"red"
)
pen2
.
pensize
(
5
)
pen2
.
write
(
"减肥
\n
SB."
,
font
=
(
"Times"
,
30
,
"normal"
))
pen2
.
hideturtle
()
draw
()
#画爱心
writer
()
#写文字
turtle
.
done
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment