Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson6-1
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
7451b3f4
authored
Sep 14, 2025
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
82c8c45e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
diy.py
uh.py
尝试.py
火。py
diy.py
View file @
7451b3f4
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
bro1
=
"关羽"
bro1
=
"关羽"
bro2
=
"刘备"
bro2
=
"刘备"
bro3
=
"张飞"
bro3
=
"张飞"
bros
=
[
"刘备"
,
"关羽"
,
"张飞"
]
bros
=
[
"苹果"
,
"香蕉"
,
"西瓜"
,
"刘备"
,
"关羽"
,
"张飞"
]
bros
[
3
:]
bro1
=
[
"关羽"
,
160
,
8.5
]
bro1
=
[
"关羽"
,
160
,
8.5
]
bro2
=
[
"刘备"
,
161
,
9.1
]
bro2
=
[
"刘备"
,
161
,
9.1
]
bro3
=
[
"张飞"
,
166
,
8.3
]
bro3
=
[
"张飞"
,
166
,
8.3
]
...
...
uh.py
0 → 100644
View file @
7451b3f4
name
=
'刘备'
power
=
66
hero
=
[
"苹果"
,
30
,
"香蕉"
,
37
,
"西瓜"
,
52
,
"刘备"
,
66
,
"关羽"
,
89
,
"张飞"
,
98
]
for
i
in
range
(
len
(
hero
)):
if
i
%
2
==
1
and
hero
[
i
]
>=
power
:
hero
.
insert
(
i
-
1
,
name
)
hero
.
insert
(
i
,
power
)
print
(
hero
)
\ No newline at end of file
尝试.py
View file @
7451b3f4
list
=
[
"苹果"
,
"香蕉"
,
"西瓜"
,
"香蕉"
,
"桃子"
,
"香蕉"
]
++ "b/\345\260\235\350\257\225.py"
list
=
[
"苹果"
,
"香蕉"
,
"西瓜"
,
"香蕉"
,
"桃子"
,
"香蕉"
]
list
.
remove
(
'香蕉'
)
print
(
list
)
\ No newline at end of file
火。py
0 → 100644
View file @
7451b3f4
anme='刘备'
power=66
hero=["苹果",30,"香蕉",37,"西瓜",52,"刘备",66,"关羽",89,"张飞"98]
for i in range(len(hero)):
if i%2==1 and hero[i]>=power:
hero.insert(i-1,name)
hero.insert(i,power)
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