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
1de34f5f
authored
4 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
50b8d58b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
7.py
diy1.py
7.py
0 → 100644
View file @
1de34f5f
import
turtle
screen
=
turtle
.
Screen
()
name
=
screen
.
textinput
(
"姓名框"
,
"你的名字是:"
)
pen
=
turtle
.
Pen
()
pen
.
color
(
"black"
)
pen
.
write
(
name
+
"欢迎你!"
,
font
=
(
"Times"
,
"50"
,
"normal"
))
turtle
.
done
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
diy1.py
0 → 100644
View file @
1de34f5f
# 利用write()帮助悟空给诺依回信吧~
import
turtle
#写字
screen
=
turtle
.
Screen
()
num
=
screen
.
textinput
(
"提示"
,
"你想要多大的爱心:"
)
lovesize
=
int
(
num
)
screen
.
bgcolor
(
"black"
)
pencil
=
turtle
.
Pen
()
pencil
.
pensize
(
5
)
pencil
.
color
(
"red"
)
pencil
.
setheading
(
45
)
pencil
.
forward
(
2
*
lovesize
)
pencil
.
circle
(
lovesize
,
180
)
pencil
.
right
(
90
)
pencil
.
circle
(
lovesize
,
180
)
pencil
.
forward
(
2
*
lovesize
)
pencil
.
hideturtle
()
pen
=
turtle
.
Pen
()
pen
.
color
(
"yellow"
)
pen
.
up
()
pen
.
goto
(
110
,
-
110
)
pen
.
write
(
"端午节
\n
快乐!"
,
font
=
(
"Times"
,
"40"
,
"normal"
))
pen
.
hideturtle
()
turtle
.
done
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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