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
b0bfee66
authored
Aug 06, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
23dfff73
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
0 deletions
diy.py
diy1.py
diy2.py
花花.py
diy.py
0 → 100644
View file @
b0bfee66
import
turtle
pen
=
turtle
.
Pen
()
pen
.
fillcolor
(
"black"
)
pen
.
shape
(
"turtle"
)
pen
.
beginfill
()
for
i
in
range
(
5
):
pen
.
forword
(
200
)
pen
.
right
(
144
)
pen
.
endfill
()
pen
.
hideturtle
()
turtle
.
done
()
\ No newline at end of file
diy1.py
0 → 100644
View file @
b0bfee66
player
=
input
(
"请出拳:石头/剪刀/布"
)
# 玩家出拳
print
(
"玩家出拳:"
+
player
)
import
random
list
=
[
"石头"
,
"剪刀"
,
"布"
]
letter
=
random
.
choice
(
list
)
print
(
letter
)
if
player
in
list
:
if
player
==
letter
:
print
(
"平局"
)
elif
player
==
"布"
and
letter
==
"石头"
:
print
(
"赢"
)
elif
player
==
"剪刀"
and
letter
==
"布"
:
print
(
"赢"
)
elif
player
==
"石头"
and
letter
==
"剪刀"
:
print
(
"赢"
)
else
:
print
(
"输"
)
else
:
print
(
"输入错误"
)
\ No newline at end of file
diy2.py
0 → 100644
View file @
b0bfee66
player
=
input
(
"请出拳:石头/剪刀/布:"
)
print
(
"玩家出拳:"
+
player
)
\ No newline at end of file
花花.py
0 → 100644
View file @
b0bfee66
import
turtle
import
turtle
pen
=
turtle
.
Pen
()
pen
.
fillcolor
(
"pink"
)
pen
.
shape
(
"turtle"
)
pen
.
begin_fill
()
for
i
in
range
(
5
):
pen
.
forward
(
200
)
pen
.
right
(
144
)
pen
.
end_fill
()
pen
.
hideturtle
()
turtle
.
done
()
\ 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