Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-4-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
7a21f422
authored
Nov 29, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
b90a8477
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
diy1.py
diy1.py
View file @
7a21f422
import
random
# 玩家出拳
import
random
# 玩家出拳
import
time
print
(
"********祖安大舞台,有妈你就来********"
)
print
(
"***********正在加载***********"
)
print
(
"┃|┃|┃|20
%
"
)
time
.
sleep
(
1
)
print
(
"┃|┃|┃|40
%
┃|┃|┃|"
)
time
.
sleep
(
1
)
print
(
"┃|┃|┃|60
%
┃|┃┃|┃|┃|┃|┃"
)
time
.
sleep
(
1
)
print
(
"┃|┃|┃|99
%
┃|┃|┃|┃|┃|┃|┃|┃|┃|"
)
time
.
sleep
(
1
)
print
(
"┃|┃|┃|99
%
┃|┃|┃|┃|┃|┃|┃|┃|┃|"
)
time
.
sleep
(
1
)
print
(
"┃|┃|┃|100
%
┃|┃|┃┃|┃|┃|┃|┃|┃|"
)
list
=
[
"剪刀"
,
"石头"
,
"布"
]
list
=
[
"剪刀"
,
"石头"
,
"布"
]
player
=
input
(
"请玩家出拳(剪刀/石头/布):"
)
player
=
input
(
"请玩家出拳(剪刀/石头/布):"
)
print
(
"玩家出的拳是:"
+
player
)
print
(
"玩家出的拳是:"
+
player
)
computer
=
random
.
choice
(
list
)
computer
=
random
.
choice
(
list
)
print
(
computer
)
print
(
"电脑出的拳是:"
+
computer
)
if
player
in
list
:
if
player
in
list
:
if
player
==
computer
:
if
player
==
computer
:
print
(
"平局"
)
print
(
"平局"
)
...
@@ -12,4 +26,4 @@ if player in list:
...
@@ -12,4 +26,4 @@ if player in list:
else
:
else
:
print
(
"很遗憾,你输了"
)
print
(
"很遗憾,你输了"
)
else
:
else
:
(
"不好意思,出错了"
)
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