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
e4cf5158
authored
Nov 29, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
b5c6bbbe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
121 additions
and
0 deletions
1.py
diy1.py
1.py
0 → 100644
View file @
e4cf5158
import
random
#载入[随机数]模块
print
(
"正在载入中"
)
print
(
"如果是第一次登陆需加载信息较多,请耐心等待。"
)
print
(
"载入中......"
)
print
(
"1
%
"
)
print
(
"25
%
"
)
print
(
"87
%
"
)
for
i
in
range
(
5
):
print
(
"99
%
"
)
print
(
"100
%
"
)
print
(
"加载成功!欢迎进入游戏!"
)
# 玩家出拳
a
=
input
(
"请出拳:"
)
print
(
"玩家出拳:"
+
a
)
print
(
"*******************"
)
#我是分割线
# 电脑出拳
b
=
[
"石头"
,
"剪刀"
,
"布"
]
computer
=
random
.
choice
(
b
)
print
(
"电脑出拳:"
+
computer
)
diy1.py
0 → 100644
View file @
e4cf5158
import
random
import
time
# 加载
print
(
"在开始游戏前请确定您所需的语言"
)
print
(
"如下表:
"
1.
汉语
"
"
2.
English
"
"
3.
日本語
")
language=input()
if language=="
汉语
":
print("
正在载入中
")
time.sleep(1)
print("
如果是第一次登陆需加载信息较多,请耐心等待。
")
print("
载入中
......
")
time.sleep(1)
print("
1
%
")
time.sleep(1)
print("
25
%
")
time.sleep(0.5)
print("
87
%
")
time.sleep(1)
for i in range(5):
print("
99
%
")
time.sleep(1)
print("
100
%
")
time.sleep(1)
print("
加载成功!欢迎进入游戏!
")
elif language=="
English
"
print("
Loading
")
time.sleep(1)
print("
If
it
is
the
first
time
to
log
in
,
please
wait
patiently
.
")
print("
Loading
......
")
time.sleep(1)
print("
1
%
")
time.sleep(1)
print("
25
%
")
time.sleep(0.5)
print("
87
%
")
time.sleep(1)
for i in range(5):
print("
99
%
")
time.sleep(1)
print("
100
%
")
time.sleep(1)
print("
Loading
succeeded
!
Welcome
to
the
game
!
")
elif language=="
日本語
"
print("
読み込み
")
time.sleep(1)
print("
If
it
is
the
first
time
to
log
in
,
please
wait
patiently
.
")
print("
読み込み
......
")
time.sleep(1)
print("
1
%
")
time.sleep(1)
print("
25
%
")
time.sleep(0.5)
print("
87
%
")
time.sleep(1)
for i in range(5):
print("
99
%
")
time.sleep(1)
print("
100
%
")
time.sleep(1)
print("
読み込みが成功!ようこそゲームに!
")
# 玩家出拳
a=input("
请出拳:
")
print("
玩家出拳:
"+a)
# 电脑出拳
b=["
石头
","
剪刀
","
布
"]
c=random.choice(b)
print("
电脑出拳:
"+c)
# 判断
if a in b:
if a==c:
print("
平局
")
elif (a=="
石头
" and c=="
剪刀
") or (a=="
剪刀
" and c=="
布
") or (a=="
布
" and c=="
石头
"):
print("
You
Win
!
")
else:
print("
You
Lose
!
")
else:
print("
Input
Error
,
Please
Input
the
right
answer
.
")
\ 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