Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-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
0b95290c
authored
Oct 23, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
3515f1dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
1.py
diy1.py
1.py
0 → 100644
View file @
0b95290c
name
=
"我们一起出去玩呀哈哈哈哈哈"
for
i
in
name
:
print
(
i
)
\ No newline at end of file
diy1.py
View file @
0b95290c
# 我们都爱夸夸夸
import
turtle
#创建画布
\ No newline at end of file
pen
=
turtle
.
Pen
()
#创建画笔pen
pen
.
fillcolor
(
"red"
)
#填充颜色
pen
.
begin_fill
()
#填充开始
for
i
in
range
(
5
):
#重复循环5次 注意别忘了冒号和循环体要按以下tab键
pen
.
forward
(
100
)
#画笔移动100
pen
.
right
(
144
)
#画笔右转 pen.left()左转
pen
.
hideturtle
()
#隐藏画笔
pen
.
end_fill
()
#填充结束
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