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
6b113616
authored
Jan 26, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
4cac003e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
3 deletions
abc/diy1.py
diy1.py
abc/diy1.py
0 → 100644
View file @
6b113616
import
random
import
time
print
(
'您好,我是N2024_10'
)
time
.
sleep
(
2
)
print
(
'我们玩石头剪刀布吧'
)
time
.
sleep
(
2
)
player
=
input
(
'请出拳(石头/剪刀/布):'
)
list1
=
[
'石头'
,
'剪刀'
,
'布'
]
computer
=
random
.
choice
(
list1
)
print
(
'玩家:'
+
player
)
print
(
'N2024_10:'
+
computer
)
if
player
==
'石头'
or
player
==
'剪刀'
or
player
==
'布'
:
if
player
==
computer
:
print
(
'N2024_10:'
+
'平局'
)
elif
player
==
'石头'
and
computer
==
'剪刀'
:
print
(
'N2024_10:'
+
'恭喜,你赢了'
)
elif
player
==
'剪刀'
and
computer
==
'布'
:
print
(
'N2024_10:'
+
'恭喜,你赢了'
)
elif
player
==
'布'
and
computer
==
'石头'
:
print
(
'N2024_10:'
+
'恭喜,你赢了'
)
else
:
print
(
'N2024_10:'
+
'很遗憾,你输了'
)
else
:
print
(
'N2024_10:'
+
'你出的啥玩意儿?看不懂!'
)
time
.
sleep
(
2
)
print
(
'你是不是想耍赖?!'
)
time
.
sleep
(
2
)
print
(
'菜,就多练'
)
time
.
sleep
(
1
)
print
(
'输不起,就别玩'
)
time
.
sleep
(
1
)
print
(
'以前是以前,'
)
time
.
sleep
(
1
)
print
(
'现在是现在,'
)
time
.
sleep
(
1
)
print
(
'你咋这么菜呢?'
)
time
.
sleep
(
1
)
\ No newline at end of file
diy1.py
deleted
100644 → 0
View file @
4cac003e
neme
=
input
(
"输入名字"
)
print
(
neme
+
"你好啊"
)
\ 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