Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-1-2_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
7ee960da
authored
Aug 18, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
e3e4e6c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
1.py
a.py
1.py
0 → 100644
View file @
7ee960da
import
turtle
pen
=
turtle
.
Pen
()
pen
.
write
(
"嘿,
\n
玩游戏要啸着玩"
,
font
=
(
"仿宋"
,
50
,
"normal"
))
turtle
.
done
()
\ No newline at end of file
a.py
View file @
7ee960da
import
random
player
=
input
(
"选择(石头-剪刀-布):"
)
player
=
input
(
"选择(石头-剪刀-布):"
)
print
(
"玩家选择:"
+
player
)
print
(
"玩家选择:"
+
player
)
\ No newline at end of file
list
=
[
"石头"
,
"剪刀"
,
"布"
]
computer
=
random
.
choice
(
list
)
print
(
"计算机选择"
+
computer
)
if
computer
==
player
:
print
(
"双方打平"
)
elif
(
computer
==
"石头"
and
player
==
"布"
)
or
(
computer
==
"剪刀"
and
player
==
"石头"
)
or
(
computer
==
"布"
and
player
==
"剪刀"
):
print
(
"player胜利"
)
else
:
print
(
"computer胜利"
)
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