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
8c5684e7
authored
Aug 21, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
5b91e2be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
diy1.py
diy1.py
View file @
8c5684e7
# 利用write()帮助悟空给诺依回信吧~
import
turtle
import
turtle
#背景颜色
pen
=
turtle
.
Pen
screen
=
turtle
.
Screen
()
#导入screen函数设置画布
screen
.
bgcolor
(
"blue"
)
#设置画布颜色
#写字
pen
=
turtle
.
Pen
()
#导入画笔
pen
.
penup
()
#抬笔
pen
.
goto
(
100
,
-
100
)
#移动到(100,-100)
pen
.
write
(
"雷霆嘎巴,
\n
无情哈拉少,
\n
ZBC
\n
"
,
font
=
(
"Times"
,
30
,
"normal"
))
pen
.
hideturtle
()
#隐藏画笔
#画爱心
pen1
=
turtle
.
Pen
()
#导入画笔
pen1
.
pencolor
(
"pink"
)
#设置颜色
pen1
.
pensize
(
5
)
#设置字体大小
len
=
80
pen1
.
left
(
45
)
#向左旋转45度
pen1
.
forward
(
2
*
len
)
#移动(100)步
pen1
.
circle
(
len
,
180
)
#画半圆
pen1
.
right
(
90
)
#向右旋转(90)度
pen1
.
circle
(
len
,
180
)
#画半圆
pen1
.
forward
(
2
*
len
)
#移动(100)步
pen1
.
hideturtle
()
#隐藏画笔
turtle
.
done
()
#停止绘画
# import turtle
# screen=turtle.Screen()
# screen.texeinput("姓名","你的名字是:")
# 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