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
70187df7
authored
Jul 23, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
71670a71
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
diy1.py
diy1.py
View file @
70187df7
# 玩家出拳
p
=
input
(
"妈的,猜拳还怎么慢,快出"
)
print
(
"出的啥呀?"
+
p
)
import
random
as
r
list
=
[
"石头啊"
,
"剪刀呦"
,
"布欸"
]
computer
=
r
.
choice
(
list
)
print
(
"该我了"
+
computer
)
\ No newline at end of file
while
True
:
p
=
input
(
"妈的,猜拳还怎么慢,快出"
)
print
(
"出的啥呀?"
+
p
)
import
random
as
r
list
=
[
"石头啊"
,
"剪刀呦"
,
"布欸"
]
c
=
r
.
choice
(
list
)
print
(
"该我了"
+
c
)
if
p
==
ai
:
print
(
"小伙子不错,平局"
)
elif
p
==
"石头"
c
==
"剪刀"
:
print
(
"woc,你赢了"
)
elif
p
==
"布"
c
==
"石头"
:
print
(
"woc,你赢了"
)
elif
p
==
"剪刀"
c
==
"布"
:
print
(
"woc,你赢了"
)
else
:
print
(
"噫,你输了"
)
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