Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson6-2
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
376a07d6
authored
May 02, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
f20e6757
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
3 deletions
1.py
2.py
3.py
quiz.py
1.py
0 → 100644
View file @
376a07d6
c
=
[[
0
for
i
in
range
(
2
)]
for
i
in
range
(
11
)]
#存放奇数个5和偶数个5的二维列表
c
[
1
][
0
]
=
9
#一位数中包含偶数个5的个数
c
[
1
][
1
]
=
1
#一位数中包含奇数个5的个数
k
=
9
n
=
4
for
i
in
range
(
2
,
n
+
1
):
if
i
==
n
:
k
=
k
-
1
c
[
i
][
0
]
=
c
[
i
-
1
][
1
]
+
k
*
c
[
i
-
1
][
0
]
c
[
i
][
1
]
=
k
*
c
[
i
-
1
][
1
]
+
c
[
i
-
1
][
0
]
print
(
c
)
\ No newline at end of file
2.py
0 → 100644
View file @
376a07d6
import
math
print
(
math
.
sqrt
(
0.2
))
\ No newline at end of file
3.py
0 → 100644
View file @
376a07d6
import
turtle
turtle
.
circle
(
80
,
-
360
)
turtle
.
circle
(
-
80
)
turtle
.
forward
(
160
)
turtle
.
circle
(
80
)
turtle
.
circle
(
-
80
)
turtle
.
done
()
\ No newline at end of file
quiz.py
View file @
376a07d6
# 勇于挑战的创造师,请运行以下代码,看看能不能删掉水果列表中的香蕉,运行结果是什么呢?
# 勇于挑战的创造师,请运行以下代码,看看能不能删掉水果列表中的香蕉,运行结果是什么呢?
list
=
[
'苹果'
,
'香蕉'
,
'西瓜'
,
'香蕉'
,
'桃子'
,
'香蕉'
]
list
=
[
'苹果'
,
'香蕉'
,
'西瓜'
,
'香蕉'
,
'桃子'
,
'香蕉'
]
for
i
in
range
(
len
(
list
)):
while
True
:
if
"香蕉"
in
list
:
try
:
list
.
remove
(
"香蕉"
)
list
.
remove
(
'香蕉'
)
except
:
break
print
(
list
)
print
(
list
)
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