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
4ff9f583
authored
Dec 04, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
587ac78e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
star.py
star.py
View file @
4ff9f583
# 上节课你是这样绘制的五角星👇:
# 上节课你是这样绘制的五角星👇:
# 这节课你可以利用新学的知识自定义五角星的颜色
# 这节课你可以利用新学的知识自定义五角星的颜色
import
turtle
import
turtle
rcq
=
input
(
"你想出什么拳:"
)
import
random
jcp
=
randow
(
0
,
2
)
rcq
=
input
(
"你想出什么拳(石/剪/布):"
)
if
rcp
==
"0"
:
jcq
=
random
.
randint
(
0
,
2
)
if
jcq
==
0
:
print
(
"机器人出的:石"
)
if
jcq
==
1
:
print
(
"机器人出的:布"
)
if
jcq
==
2
:
print
(
"机器人出的:剪"
)
if
rcq
==
"石"
:
if
jcq
==
0
:
if
jcq
==
0
:
print
(
"平手!"
)
print
(
"平手!"
)
elif
jcq
==
1
elif
jcq
==
1
:
print
(
"机器人赢!"
)
print
(
"机器人赢!"
)
el
if
:
el
se
:
print
(
"玩家赢!"
)
print
(
"玩家赢!"
)
if
rcp
==
"1
"
:
elif
rcq
==
"布
"
:
if
jcq
==
1
:
if
jcq
==
1
:
print
(
"平手!"
)
print
(
"平手!"
)
elif
jcq
==
2
elif
jcq
==
2
:
print
(
"机器人赢!"
)
print
(
"机器人赢!"
)
el
if
:
el
se
:
print
(
"玩家赢!"
)
print
(
"玩家赢!"
)
if
rcp
==
"2
"
:
elif
rcq
==
"剪
"
:
if
jcq
==
2
:
if
jcq
==
2
:
print
(
"平手!"
)
print
(
"平手!"
)
elif
jcq
==
0
elif
jcq
==
0
:
print
(
"机器人赢!"
)
print
(
"机器人赢!"
)
el
if
:
el
se
:
print
(
"玩家赢!"
)
print
(
"玩家赢!"
)
input
()
input
()
\ 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