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
10f5e3d2
authored
Mar 29, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
78ff6c52
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
5 deletions
diy1.py
saj.py
zg.py
diy1.py
View file @
10f5e3d2
import
random
#等待玩家输入
playerpls
=
raw_input
(
"请输入:剪刀(0) 石头(1) 布(2):"
)
player
=
int
(
playerpls
)
#人机瓜皮
ubuntu
=
random
.
randint
(
0
,
2
)
#判断输赢
if
(
player
==
0
and
ubuntu
==
2
)
or
(
player
==
1
and
ubuntu
==
0
)
or
(
player
==
2
and
ubuntu
==
1
):
print
(
"牛逼,你赢了"
)
elif
ubuntu
==
player
:
print
(
"平了,那你别想走,再来一把"
)
else
:
print
(
"你输了,垃圾,滚吧"
)
import
randow
list2
=
[
"石頭"",""剪刀"",""布"
]
a1
=
randow
.
choice
(
list2
)
print
(
"計算機選擇的事:"
+
a1
)
\ No newline at end of file
saj.py
0 → 100644
View file @
10f5e3d2
a
=
input
(
"shuru"
)
a
=
int
(
a
)
if
not
(
a
%
2
)
and
not
(
a
%
7
):
print
(
"yes"
)
else
print
(
"no"
)
\ No newline at end of file
zg.py
0 → 100644
View file @
10f5e3d2
a
=
input
(
"输入"
)
a
=
int
(
a
)
if
a
==
10
:
print
(
"等于"
)
elif
:
if
a
<
10
:
print
(
"小于"
)
else
:
print
(
"大于"
)
\ 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