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
25caafef
authored
Feb 18, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
b3fe85bb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
9 deletions
diy1.py
gdx2.py
gg4.py
rge3.py
rrr5.py
diy1.py
View file @
25caafef
# 玩家出拳
# 玩家出拳
import
random
import
random
n
=
input
(
'请输入:'
)
player
=
input
(
'请输入:'
)
print
(
'玩家出拳'
,
n
)
print
(
'玩家出拳'
,
player
)
t
=
[
"石头"
,
"剪刀"
,
"布"
]
list
=
[
"石头"
,
"剪刀"
,
"布"
]
c
=
random
.
choice
(
t
)
computer
=
random
.
choice
(
list
)
print
(
'电脑出的是'
,
c
)
print
(
'电脑出的是'
,
computer
)
list
=
[
'石头'
,
'剪刀'
,
'布'
]
computer
=
random
.
choice
(
list
)
print
(
'电脑出拳'
)
if
player
==
computer
:
\ No newline at end of file
if
player
==
computer
:
print
(
"平局"
)
elif
(
player
==
"石头"
and
computer
==
"剪刀"
)
or
(
player
==
"剪刀"
and
computer
==
"布"
):
print
(
"恭喜,你赢了"
)
else
:
print
(
"你输了"
)
else
:
print
(
"错误"
)
\ No newline at end of file
gdx2.py
0 → 100644
View file @
25caafef
h
=
input
(
"请输入:"
)
s
=
input
(
"请输入:"
)
print
(
h
+
'成绩是:'
+
s
)
\ No newline at end of file
gg4.py
0 → 100644
View file @
25caafef
player
=
input
(
'请输入:'
)
list
=
[
"ipad"
,
"电脑"
,
"糖果"
]
mm
=
random
.
choice
()
print
(
'player'
+
'你的是'
+
mm
)
\ No newline at end of file
rge3.py
0 → 100644
View file @
25caafef
import
random
week
=
input
(
"今天星期几"
)
if
week
==
'星期一'
:
print
(
week
+
'学钢琴'
)
elif
week
==
'星期三'
:
print
(
week
+
'学编程'
):
elif
week
==
'星期六'
:
print
(
week
+
'学English'
):
else
:
print
(
"学中文"
)
else
:
print
(
"错误"
)
\ No newline at end of file
rrr5.py
0 → 100644
View file @
25caafef
a1
=
input
(
'jrgrhrf'
)
a2
=
input
(
'ry4th5t'
)
if
a1
==
:
pass
\ 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