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
8b078289
authored
Jun 08, 2024
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
5 additions
and
0 deletions
diy.py
diy.py
View file @
8b078289
...
...
@@ -4,10 +4,14 @@
bro1
=
"关羽"
bro2
=
"刘备"
bro3
=
"张飞"
#用列表表示三人,表示三人准备结义
bros
=
[
"刘备"
,
"关羽"
,
"张飞"
]
#用列表表示三人的身份,表示三人准备结义,所以展示出自己的身份
bro1
=
[
"关羽"
,
160
,
8.5
]
bro2
=
[
"刘备"
,
161
,
9.1
]
bro3
=
[
"张飞"
,
166
,
8.3
]
#用列表将刘备和张飞在列表中的位置替换,本来张飞比刘备大一岁,但是刘备比张飞的综合能力强,所以让刘备占C位
bros
[
0
]
=
"关羽"
bros
[
1
]
=
"刘备"
#用print()函数输出三人的名字,表示三人成功结义
print
(
bros
)
\ 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