Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-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
256e2181
authored
Sep 11, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
cbd76e4b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
2 deletions
01.py
02.py
03.py
04.py
1
1.py
diy1.py
01.py
0 → 100644
View file @
256e2181
import
random
stu
=
[
"李俊逸"
,
"林阳泰"
,
"宋腾洋"
]
print
(
random
.
choice
(
stu
))
\ No newline at end of file
02.py
0 → 100644
View file @
256e2181
import
turtle
pen
=
turtle
.
Pen
()
for
i
in
range
(
1
,
6
):
pen
.
forward
(
250
)
pen
.
left
(
144
)
turtle
.
done
()
\ No newline at end of file
03.py
0 → 100644
View file @
256e2181
import
random
a
=
random
.
randint
(
1
,
10000000
)
print
(
a
)
\ No newline at end of file
04.py
0 → 100644
View file @
256e2181
import
random
list
=
[
"苹果"
,
"香蕉"
,
"奶茶"
,
"西瓜"
,
"哈密瓜"
,
"李松瑞"
]
a
=
random
.
choice
(
list
)
print
(
a
)
1
0 → 100644
View file @
256e2181
import turtle
pen=turtle.Pen()
pen.right(144)
turtle.done()
\ No newline at end of file
1.py
0 → 100644
View file @
256e2181
import
turtle
pen
=
turtle
.
Pen
()
pen
.
fillcolor
(
"yellow"
)
pen
.
begin_fill
()
pen
.
right
(
144
)
pen
.
forward
(
100
)
pen
.
right
(
144
)
pen
.
forward
(
100
)
pen
.
right
(
144
)
pen
.
forward
(
100
)
pen
.
right
(
144
)
pen
.
forward
(
100
)
pen
.
right
(
144
)
pen
.
forward
(
100
)
pen
.
end_fill
()
turtle
.
done
()
\ No newline at end of file
diy1.py
View file @
256e2181
# 玩家出拳
player
=
input
(
"石头/剪刀/布"
)
print
(
'玩家出'
+
player
)
\ No newline at end of file
print
(
'玩家出'
+
player
)
import
random
n
=
[
"石头"
,
"剪刀"
,
"布"
]
computer
=
random
.
choice
(
n
)
print
(
computer
)
\ 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