Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-5_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
22efff53
authored
Dec 04, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
ef280433
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
18 deletions
diy1.py
diy1.py
View file @
22efff53
# 玩家出拳
player
=
input
(
"小伙子,你出什么呢"
)
print
(
"玩家出拳:"
+
player
)
import
random
import
random
player
=
input
(
"你个怨种要出什么?"
)
print
(
"怨种出拳"
+
player
)
list
=
[
"万象天引"
,
"神罗天征"
,
"地爆天星"
]
list
=
[
"万象天引"
,
"神罗天征"
,
"地爆天星"
]
computer
=
random
.
choice
(
list
)
computer
=
random
.
choice
(
list
)
print
(
"计算机出拳:"
+
computer
)
print
(
"佩恩出拳"
+
computer
)
if
player
in
list
:
\ No newline at end of file
if
player
==
computer
:
print
(
"平局,出发幻术别天神,玩家胜利"
)
elif
player
==
"万象天引"
and
computer
==
"地爆天星"
:
print
(
"小伙子,你赢了!!!!!!"
)
elif
player
==
"地爆天星"
and
computer
==
"神罗天征"
:
print
(
"小伙子,你赢了!!!!!!"
)
elif
player
==
"神罗天征"
and
computer
==
"万象天引"
:
print
(
"小伙子,你赢了!!!!!!"
)
else
:
print
(
"你输了,触发伊邪那美,玩家强制胜利"
)
if
not
player
in
list
:
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