Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-1-1_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
b0f70762
authored
Mar 05, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
32949ac8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
dss.py
dss.py
View file @
b0f70762
#导入turtle库
#导入turtle库
import
turtle
import
turtle
# #创建画笔
# #创建画笔
#pen
=turtle.Pen()
pen1
=
turtle
.
Pen
()
# 写字
# 写字
# pen.write("诺依你好啊,\nturtle模块真好用,\n我会在画布上写字了",font=("Times",30,"normal"))
# pen.write("诺依你好啊,\nturtle模块真好用,\n我会在画布上写字了",font=("Times",30,"normal"))
# #隐藏
# #隐藏
...
@@ -23,6 +23,15 @@ import turtle
...
@@ -23,6 +23,15 @@ import turtle
#pen1.left(45)
#pen1.left(45)
#pen1.forward(100)
#pen1.forward(100)
#pen1.circle
#pen1.circle
screen
=
turtle
.
Screen
()
len
=
screen
.
textinput
(
"提示"
,
"您要多大的爱心呀?"
)
lovesize
=
int
(
len
)
pen1
.
left
(
45
)
pen1
.
forward
(
2
*
lovesize
)
pen1
.
circle
(
lovesize
,
180
)
pen1
.
right
(
90
)
pen1
.
circle
(
lovesize
,
180
)
pen1
.
forward
(
2
*
lovesize
)
len
=
60
len
=
60
...
@@ -35,7 +44,7 @@ pen1.forward(2*len)
...
@@ -35,7 +44,7 @@ pen1.forward(2*len)
screen
=
turtle
.
Screen
()
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"light blue"
)
screen
.
bgcolor
(
"light blue"
)
pen
=
turtle
.
Pen
()
#pen1
=turtle.Pen()
pen
.
penup
()
pen
.
penup
()
pen
.
goto
(
-
100
,
0
)
pen
.
goto
(
-
100
,
0
)
pen
.
write
(
"祝你生日快乐!"
,
font
=
(
"Times"
,
30
,
"normal"
))
pen
.
write
(
"祝你生日快乐!"
,
font
=
(
"Times"
,
30
,
"normal"
))
...
...
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