Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-4-1_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
64c167b5
authored
May 29, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
69e2ae49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
diy1.py
diy1.py
View file @
64c167b5
player
=
input
(
"玩家出
拳石头、剪刀、布,请出拳
"
)
player
=
input
(
"玩家出
枪:M416、MK14、GOUZA,请出枪
"
)
print
(
"玩家出:"
+
player
)
print
(
"玩家出:"
+
player
)
import
random
import
random
list
=
[
"
石头"
,
"剪刀"
,
"布
"
]
list
=
[
"
M416"
,
"MK14"
,
"GOUZA
"
]
C
=
random
.
choice
(
list
)
C
=
random
.
choice
(
list
)
print
(
"电脑出拳:"
+
C
)
print
(
"电脑出枪:"
+
C
)
if
player
==
C
:
print
(
"FUCK!平局!"
)
elif
player
==
"M416"
and
C
==
"MK14"
:
print
(
"cao!你赢了!"
)
elif
player
==
"MK14"
and
C
==
"GOUZA"
:
print
(
"cao!你赢了!"
)
elif
player
==
"GOUZA"
and
C
==
"M416"
:
print
(
"cao!你赢了!"
)
else
:
print
(
"哈哈哈!老子赢了!"
)
\ 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