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
16729c39
authored
Oct 28, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
26b3b1d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
diy.py
diy.py
View file @
16729c39
...
@@ -4,10 +4,15 @@
...
@@ -4,10 +4,15 @@
bro1
=
"关羽"
bro1
=
"关羽"
bro2
=
"刘备"
bro2
=
"刘备"
bro3
=
"张飞"
bro3
=
"张飞"
#他们来到了桃园准备结拜。
bros
=
[
"刘备"
,
"关羽"
,
"张飞"
]
bros
=
[
"刘备"
,
"关羽"
,
"张飞"
]
#准备好了结拜的东西,要排个辈分出来,三个人的臂力值是这样的:
bro1
=
[
"关羽"
,
160
,
8.5
]
bro1
=
[
"关羽"
,
160
,
8.5
]
bro2
=
[
"刘备"
,
161
,
9.1
]
bro2
=
[
"刘备"
,
161
,
9.1
]
bro3
=
[
"张飞"
,
166
,
8.3
]
bro3
=
[
"张飞"
,
166
,
8.3
]
#能力值最强的是刘备,关羽甘心做老二,让刘备做大哥,大哥放中间,
# 所以把列表中的刘备替换为关羽,关羽替换为刘备:
bros
[
0
]
=
"关羽"
bros
[
0
]
=
"关羽"
bros
[
1
]
=
"刘备"
bros
[
1
]
=
"刘备"
print
(
bros
)
print
(
bros
)
\ No newline at end of file
#打印列表,这就是桃园结义的故事。
\ 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