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
7780b377
authored
Jul 15, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
ddb15e15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
diy1.py
sdf.py
diy1.py
View file @
7780b377
neme
=
input
(
"输入名字"
)
import
random
print
(
neme
+
"你好啊"
)
player
=
input
(
"你走上方台:(石头/剪刀/布): "
)
list
=
[
"st"
,
"jd"
,
"b"
]
computer
=
random
.
choice
(
list
)
print
(
"玩家出拳:"
+
player
)
print
(
"铜人出拳:"
+
computer
)
if
player
in
list
:
if
player
==
computer
:
print
(
"平局"
)
elif
(
player
==
"st"
and
computer
==
"jd"
)
or
(
player
==
"jd"
and
computer
==
"b"
)
or
(
player
==
"b"
and
computer
==
"st"
):
print
(
"你过关"
)
else
:
print
(
"你失败"
)
else
:
print
(
"ERROR"
)
sdf.py
0 → 100644
View file @
7780b377
import
random
list
=
[
"✊"
,
"✌️"
,
"🖐"
]
computer
=
random
.
choice
(
list
)
print
(
"计算机出拳:"
+
computer
)
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