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
876b51e6
authored
4 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
7677a835
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
2 deletions
diy1.py
diy1.py
View file @
876b51e6
# 玩家出拳
import
random
a
=
input
(
'出拳:'
)
for
i
in
range
(
100
):
print
(
"."
)
print
(
".."
)
print
(
"..."
)
print
(
"...."
)
print
(
"....."
)
print
(
"......"
)
print
(
'玩家出拳'
+
a
)
for
i
in
range
(
1000
):
print
(
'玩家出拳'
+
a
)
b
=
[
'石头'
,
'剪刀'
,
'布'
]
c
=
random
.
choice
(
b
)
print
(
'电脑出拳'
+
c
)
\ No newline at end of file
for
i
in
range
(
100
):
print
(
"."
)
print
(
".."
)
print
(
"..."
)
print
(
"...."
)
print
(
"....."
)
print
(
"......"
)
for
i
in
range
(
1000
):
print
(
'电脑出拳'
+
c
)
if
a
==
c
:
for
i
in
range
(
1000
):
print
(
'平局'
)
elif
a
==
'剪刀'
and
b
==
'布'
or
a
==
'布'
and
b
==
'石头'
or
a
==
'石头'
and
b
==
'剪刀'
:
for
i
in
range
(
1000
):
print
(
'玩家赢了!'
)
elif
a
==
'布'
and
b
==
'剪刀'
or
a
==
'石头'
and
b
==
'布'
or
a
==
'剪刀'
and
b
==
'石头'
:
for
i
in
range
(
1000
):
print
(
'玩家输了!'
)
else
:
for
i
in
range
(
1000
):
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