Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-3-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
cbe81f53
authored
2 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
394c5227
c293477l760p472a8052/cloud542048
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
diy1.py
diy1.py
View file @
cbe81f53
player
=
input
(
"请出拳:石头/剪刀/布"
)
# 玩家出拳
y
=
input
(
"请出拳:石头/剪刀/布"
)
# 玩家出拳
print
(
"玩家出拳:"
+
player
)
print
(
"玩家出拳:"
+
y
)
\ No newline at end of file
i
=
[
1
,
2
,
3
]
import
random
o
=
random
.
choice
(
i
)
print
(
o
)
if
y
==
o
print
(
"平局"
)
elif
(
y
==
1
and
i
==
2
)
or
(
y
==
2
and
i
==
3
)
or
(
y
==
3
and
i
==
1
):
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