Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson6-3
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
ac05eb5a
authored
Nov 14, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
c593e827
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
10 deletions
quiz1.py
quiz1.pyw
quiz2.py
tett.py
quiz1.py
deleted
100644 → 0
View file @
c593e827
# 勇于挑战的创造师,请运行这段代码,看看能不能将颜良、文丑加入战场?
a
=
[
'华雄'
]
a
.
append
(
'颜良'
,
'文丑'
)
print
(
a
)
quiz1.pyw
0 → 100644
View file @
ac05eb5a
num1
=
int
(
input
())
num2
=
int
(
input
())
res
=
""
for
i
in
range
(
num1
,
num2
+
1
):
if
i
%
7
==
0
and
i
%
5
!=
0
:
#拼接结果
res
=
res
+
str
(
i
)
+
','
if
res
!=
""
:
# 去掉末尾的冒号
print
(
res
[
0
:
-
1
])
quiz2.py
View file @
ac05eb5a
# 勇于挑战的创造师,请运行下面的代码,观察运行结果,和小伙伴们说说你的发现?
a
=
[
'华雄'
]
c
=
[
'颜良'
,
'文丑'
]
a
.
extend
(
c
)
print
(
a
)
\ No newline at end of file
import
turtle
pen
=
turtle
.
Pen
()
pen
.
speed
(
0
)
# pen.hideturtle()
pen
.
pencolor
(
"red"
)
pen
.
circle
(
120
)
#总共画12个菱形
for
i
in
range
(
12
):
pen
.
pencolor
(
"yellow"
)
pen
.
fillcolor
(
"yellow"
)
pen
.
begin_fill
()
pen
.
right
(
120
)
pen
.
forward
(
80
)
pen
.
left
(
60
)
pen
.
forward
(
80
)
pen
.
left
(
120
)
pen
.
forward
(
80
)
pen
.
left
(
60
)
pen
.
forward
(
80
)
pen
.
end_fill
()
#设置圆弧为红色
pen
.
pencolor
(
"red"
)
#让笔头的位置还原
pen
.
right
(
120
)
#让菱形在在圆弧上旋转30度(360/12)
pen
.
circle
(
120
,
30
)
turtle
.
done
()
tett.py
0 → 100644
View file @
ac05eb5a
letter
=
"a"
if
"a"
<=
letter
<=
"z"
:
print
(
"letter存在a-z中"
)
\ 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