Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson22-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
803016cb
authored
a year ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
6095e7fb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
12 deletions
img/a11.py
img/a12.py
img/a13.py
img/a14.py
img/a15.py
img/a4.py
img/a11.py
View file @
803016cb
import
turtle
import
turtle
import
random
turtle
.
speed
(
3
)
def
r
(
x
,
y
,
h
,
w
):
turtle
.
penup
()
turtle
.
goto
(
x
,
y
)
turtle
.
pendown
()
turtle
.
color
(
"red"
,
"red"
)
turtle
.
begin_fill
()
for
i
in
range
(
2
):
turtle
.
forward
(
h
)
turtle
.
right
(
90
)
turtle
.
forward
(
w
)
turtle
.
right
(
90
)
turtle
.
end_fill
()
def
a
(
x
,
y
,
text
):
turtle
.
penup
()
turtle
.
goto
(
x
,
y
)
turtle
.
pendown
()
turtle
.
color
(
"black"
)
turtle
.
write
(
text
,
font
=
(
"华文行楷"
,
40
))
r
(
95
,
150
,
60
,
400
)
a
(
100
,
-
250
,
"一
\n
帆
\n
风
\n
顺
\n
年
\n
年
\n
好"
)
r
(
-
155
,
150
,
60
,
400
)
a
(
-
150
,
-
250
,
"万
\n
事
\n
如
\n
意
\n
步
\n
步
\n
高"
)
r
(
-
100
,
250
,
210
,
60
)
a
(
-
100
,
190
,
"五福临门"
)
turtle
.
hideturtle
()
turtle
.
done
()
turtle
.
bgcolor
()
def
a
(
color
,
x
,
y
):
turtle
.
pensize
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
img/a12.py
0 → 100644
View file @
803016cb
from
turtle
import
*
speed
(
100
)
hideturtle
()
color1
=
[
"yellow"
,
"blue"
,
"red"
,
"green"
]
for
i
in
range
(
100
):
color
(
color1
[
i
%
4
])
circle
(
i
,
180
)
right
(
90
)
done
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
img/a13.py
0 → 100644
View file @
803016cb
from
turtle
import
*
hideturtle
()
penup
()
goto
(
-
100
,
-
100
)
pendown
()
fillcolor
(
"red"
)
begin_fill
()
for
i
in
range
(
6
):
forward
(
150
)
left
(
60
)
end_fill
()
fillcolor
(
"green"
)
for
i
in
range
(
6
):
begin_fill
()
for
i
in
range
(
3
):
forward
(
150
)
right
(
120
)
end_fill
()
forward
(
150
)
left
(
60
)
done
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
img/a14.py
0 → 100644
View file @
803016cb
#s="l love python"
#print(s[7:])
#print(s[-6:])
#print(s[7:13])
#s="hello world!"
#print(s[::-1])
#print(s[8:2:-1])
#s="www.bellcode.com"
#print(s[4:12])
#print(s[:12:2])
#print(s[-1:-11:-3])
s
=
"bellcode.bell.ai"
print
(
s
[:
4
]
+
s
[
9
:
-
3
]
+
s
[
-
2
:]
*
3
)
print
(
s
[
4
:
8
]
+
s
[
7
:
3
:
-
1
]
*
2
)
This diff is collapsed.
Click to expand it.
img/a15.py
0 → 100644
View file @
803016cb
a
\ No newline at end of file
This diff is collapsed.
Click to expand it.
img/a4.py
View file @
803016cb
import
turtle
t
.
penup
()
t
.
goto
(
-
200
,
0
)
text
=
"你好,我的名字是小小"
for
char
in
text
:
f
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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