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
608fd84e
authored
Jan 16, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
d03c7e94
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
diy1.py
diy1.py
View file @
608fd84e
...
...
@@ -18,14 +18,7 @@
#SB出拳r
#SB出拳s
#SB出拳t
SB
出拳
u
#
#SB出拳o#SB出拳o
#SB出拳o#SB出拳o
#SB出拳u
#SB出拳o
#SB出拳o
#SB出拳o
...
...
@@ -37,11 +30,16 @@ SB出拳u#
#SB出拳o
#SB出拳o
import
random
()
# 玩家出拳
import
random
# 玩家出拳
a
=
input
(
"剪刀/石头/布"
)
print
(
"玩家出"
+
a
)
import
random
()
s
=
random
(
1
,
3
)
if
(
s
==
1
)
d
=
"剪刀"
if
(
s
==
2
)
s
=
[
"剪刀"
,
"石头"
,
"布"
]
d
=
random
.
choice
(
s
)
print
(
d
)
if
(
d
==
a
):
print
(
"平局"
)
elif
(
a
==
"剪刀"
and
d
==
"石头"
):
elif
(
a
==
"石头"
and
d
==
"剪刀"
):
elif
(
a
==
"布"
and
\ 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