Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-1-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
bed0aa06
authored
Oct 28, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
342233ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
diy1.py
diy1.py
View file @
bed0aa06
qwe
=
input
(
"玩家请出拳石头/剪刀/布:"
)
qwe
=
input
(
"玩家请出拳石头/剪刀/布:"
)
print
(
"玩家出拳:"
+
qwe
)
print
(
"玩家出拳:"
+
qwe
)
import
random
if
qwer
in
q
:
q
=
[
"石头"
,
"剪刀"
,
"布"
]
import
random
qwer
=
random
.
choice
(
q
)
q
=
[
"石头"
,
"剪刀"
,
"布"
]
print
(
"机器出拳:"
,
qwer
)
qwer
=
random
.
choice
(
q
)
if
qwe
==
qwer
:
print
(
"机器出拳:"
,
qwer
)
print
(
"平局"
)
if
qwe
==
qwer
:
elif
qwe
(
"石头"
)
==
qwer
(
"剪刀"
):
print
(
"平局"
)
print
(
"太棒了,你赢了!"
)
elif
(
qwe
==
"石头"
and
qwer
==
"剪刀"
):
elif
qwe
(
"剪刀"
)
==
qwer
(
"布"
):
print
(
"太棒了,你赢了!"
)
print
(
"太棒了,你赢了!"
)
elif
(
qwe
==
"布"
and
qwer
==
"石头"
):
elif
qwe
(
"布"
)
==
qwer
(
"石头"
):
print
(
"太棒了,你赢了!"
)
print
(
"太棒了,你赢了!"
)
else
:
print
(
"还要继续努力哦!"
)
else
:
else
:
print
(
"还要继续努力哦!"
)
print
(
"输错了哦!"
)
\ No newline at end of file
\ 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