Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-1-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
8647a961
authored
Oct 20, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
5b9a8767
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
716.py
star.py
716.py
0 → 100644
View file @
8647a961
# 在python中,引号里的内容全部会被当作字符串处理;
# 例如:name是变量,"name"是字符串。
# 变量是变化的量,可以用来存放东西,一次只能存一个。
# 变量在使用之前,应该先定义,先创建,然后才能使用。
# 例如:
# name=input("姓名:")
print
(
"玩家出拳:+player"
)
\ No newline at end of file
star.py
View file @
8647a961
...
...
@@ -3,10 +3,13 @@
import
turtle
ink
=
input
(
"什么色?"
)
#绘制五角星#
pen
=
turtle
.
Pen
()
pen
.
fillcolor
(
ink
)
pen
.
fillcolor
(
ink
)
# 设置填充颜色
pen
.
begin_fill
()
for
i
in
range
(
5
):
#重复执行5次
pen
.
forward
(
200
)
#向前移动200步
pen
.
right
(
144
)
#向右移动144度,注意这里的参数一定不能变
pen
.
end_fill
()
#结束填充红色
turtle
.
done
()
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