Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson7_2
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
f1f90204
authored
3 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
bc13f44b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
rddsd.py
rddsd.py
0 → 100644
View file @
f1f90204
import
random
play
=
input
(
"剪刀/石头/布"
)
rom
=
random
.
choice
(
"剪刀/石头/布"
)
print
(
"玩家出拳"
+
play
)
print
(
"电脑出拳"
+
rom
)
if
play
==
rom
:
print
(
"平局"
)
elif
play
==
"剪刀"
and
rom
==
"布"
or
play
==
"石头"
and
rom
==
"剪刀"
or
piay
==
"布"
and
rom
==
"石头"
:
print
(
"赢"
)
else
:
print
(
"输"
)
\ 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