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
954415d0
authored
Apr 27, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
6fd2cdee
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
diy1.py
turle.py
diy1.py
View file @
954415d0
import
turtle
import
turtle
# pen = turtle.Pen()
screen
=
turtle
.
Screen
()
# pen.write("九月九日忆山东兄弟\n [唐]王维 \n \n 独在异乡为异客,\n 每逢佳节倍思亲。\n 遥知兄弟登高处,\n 遍插茱萸少一人。",font=("Times",23,"normal"))
screen
.
bgcolor
(
"light blue"
)
# pen.hideturtle()
pen
=
turtle
.
Pen
()
# turtle.done()
pen
.
penup
()
pen
.
goto
(
100
,
-
99
)
pen
.
write
(
"九月九日忆山东兄弟
\n
[唐]王维
\n
\n
独在异乡为异客,
\n
每逢佳节倍思亲。
\n
遥知兄弟登高处,
\n
遍插茱萸少一人。"
,
font
=
(
"Times"
,
18
,
"normal"
))
pen
.
hideturtle
()
pen1
=
turtle
.
Pen
()
pen1
=
turtle
.
Pen
()
screen
=
turtle
.
Screen
()
len
=
screen
.
textinput
(
"提示"
,
"你要多大的爱心:"
)
a
=
int
(
len
)
pen1
.
hideturtle
()
pen1
.
hideturtle
()
pen1
.
pensize
(
10
)
pen1
.
pensize
(
10
)
pen1
.
pencolor
(
"pink"
)
pen1
.
pencolor
(
"pink"
)
pen1
.
left
(
45
)
pen1
.
left
(
45
)
pen1
.
forward
(
100
)
pen1
.
forward
(
a
)
pen1
.
circle
(
50
,
181
-
1
)
pen1
.
circle
(
a
/
2
,
181
-
1
)
pen1
.
right
(
90
)
pen1
.
right
(
90
)
pen1
.
circle
(
50
,
189
-
9
)
pen1
.
circle
(
a
/
2
,
189
-
9
)
pen1
.
forward
(
100
)
pen1
.
forward
(
a
)
turtle
.
done
()
turtle
.
done
()
\ No newline at end of file
turle.py
0 → 100644
View file @
954415d0
import
turtle
screen
=
turtle
.
Screen
()
screen
.
textinput
(
"你叫什么?"
,
"你的名字是:"
)
turtle
.
done
()
\ No newline at end of file
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