Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-2_DIY1
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
38e5a3ce
authored
2 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
b3f7f742
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
1 deletions
44944.py
diy(1)1.py
diy(1)2.py
diy1.py
try.py
44944.py
0 → 100644
View file @
38e5a3ce
This diff is collapsed.
Click to expand it.
diy(1)1.py
0 → 100644
View file @
38e5a3ce
bro1
=
"关羽"
bro2
=
"刘备"
bro3
=
"张飞"
bros
=
[
"关羽"
,
"刘备"
,
"张飞"
]
bro1
=
[
"关羽"
,
160
,
8
,
5
]
bro2
=
[
"刘备"
,
161
,
9
,
1
]
bro3
=
[
"张飞"
,
166
,
8
,
3
]
bro
\ No newline at end of file
This diff is collapsed.
Click to expand it.
diy(1)2.py
0 → 100644
View file @
38e5a3ce
a
=
[
'华雄'
]
c
=
[
'文丑'
,
'颜良'
]
a
.
extend
(
c
)
print
(
a
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
diy1.py
View file @
38e5a3ce
...
...
@@ -3,4 +3,14 @@ print("玩家出拳:"+player)
import
random
xz
=
[
"石头"
,
"剪刀"
,
"布"
]
computer
=
random
.
choice
(
xz
)
print
(
computer
)
print
(
"计算机出拳:"
+
computer
)
if
player
in
xz
:
if
player
==
computer
:
print
(
"平局"
)
elif
(
computer
==
"布"
and
player
==
"剪刀"
)
or
(
computer
==
"剪刀"
and
player
==
"石头"
)
or
(
player
==
"布"
and
computer
==
"石头"
):
print
(
"你赢了"
)
else
:
print
(
"你输了"
)
else
:
print
(
"输入错误"
)
print
(
"游戏结束,请重按运行键再次游玩,谢谢。"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
try.py
0 → 100644
View file @
38e5a3ce
list
=
[
"1"
,
"1"
,
"2"
,
"2"
]
list
.
remove
(
"1"
)
print
(
list
)
lista
=
[
"1"
,
"1"
,
"2"
,
"2"
]
lista
.
pop
(
0
)
print
(
lista
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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