Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-1-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
a2582cd6
authored
Jan 14, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
7f913c27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
qw.py
qw.py
View file @
a2582cd6
qwer
=
input
(
"请出拳"
)
qwer
=
input
(
"请出拳"
)
print
(
"玩家出:"
+
qwer
)
print
(
"玩家出:"
+
qwer
)
\ No newline at end of file
import
random
t
=
[
"石头"
,
"剪刀"
,
"布"
]
y
=
random
.
choice
(
t
)
print
(
"电脑出:"
+
y
)
if
qwer
in
t
:
if
qwer
==
y
:
print
(
"平局"
)
elif
(
qwer
==
"石头"
and
y
==
"剪刀"
)
or
(
qwer
==
"剪刀"
and
y
==
"布"
)
or
(
qwer
==
"布"
and
y
==
"石头"
):
bubu
print
(
"恭喜,你赢了"
)
else
:
print
(
"很遗憾,你输了"
)
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