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
62aa78ed
authored
Nov 21, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
1f038949
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
star.py
star.py
View file @
62aa78ed
kk
=
input
(
"剪刀石头布"
)
import
turtle
print
(
"玩家出"
+
kk
)
pen
=
turtle
.
Pen
()
import
random
turtle
.
Screen
()
listl
=
[
'剪刀''石头''布'
]
screen
=
turtle
.
Screen
()
k
=
random
.
choice
(
listl
)
screen
.
bgcolor
(
"blue"
)
print
(
"计算机出"
+
k
)
pen
.
write
(
"nihao"
)
if
kk
==
k
:
pen
.
pensize
(
5
)
print
(
"平局"
)
pen
.
pencolor
(
"red"
)
elif
kk
==
"石头"
and
k
==
"剪刀"
pen
.
left
(
45
)
print
(
"你赢了"
)
pen
.
forward
(
100
)
elif
kk
==
"布"
and
k
==
"石头"
pen
.
circle
(
50
,
180
)
print
(
"你赢了"
)
pen
.
right
(
90
)
elif
kk
==
"剪刀"
and
k
==
"布"
pen
.
circle
(
50
,
180
)
print
(
"你赢了"
)
pen
.
forward
(
100
)
else
:
turtle
.
done
()
print
(
"计算机赢"
)
\ No newline at end of file
\ 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