Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-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
a244c5d4
authored
Apr 17, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
eba6b90d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
diy1.py
diy2.py
diy1.py
View file @
a244c5d4
...
@@ -2,19 +2,21 @@
...
@@ -2,19 +2,21 @@
import
turtle
import
turtle
Pen
=
turtle
.
Pen
()
Pen
=
turtle
.
Pen
()
Screen
=
turtle
.
Screen
()
Screen
=
turtle
.
Screen
()
len
=
Screen
.
textinput
(
"提示"
,
"嘿!靓仔,告诉爷你想要多大的爱心?"
)
r
=
int
(
len
)
Screen
.
bgcolor
(
"light pink"
)
Screen
.
bgcolor
(
"light pink"
)
Pen
.
penup
()
Pen
.
penup
()
Pen
.
goto
(
100
,
-
100
)
Pen
.
goto
(
30
,
-
25
)
Pen
.
write
(
"曾经沧海难为水,
\n
除却巫山不是云。
\n
取次花中懒回顾,
\n
半缘修道半缘君。"
,
font
=
(
"Times"
,
1
0
,
"normal"
))
Pen
.
write
(
"曾经沧海难为水,
\n
除却巫山不是云。
\n
取次花中懒回顾,
\n
半缘修道半缘君。"
,
font
=
(
"Times"
,
1
6
,
"normal"
))
Pen
.
hideturtle
()
Pen
.
hideturtle
()
Pen1
=
turtle
.
Pen
()
Pen1
=
turtle
.
Pen
()
Pen1
.
pensize
(
5
)
Pen1
.
pensize
(
5
)
Pen1
.
pencolor
(
"red"
)
Pen1
.
pencolor
(
"red"
)
Pen1
.
left
(
45
)
Pen1
.
left
(
45
)
Pen1
.
forward
(
100
)
Pen1
.
forward
(
2
*
r
)
Pen1
.
circle
(
50
,
180
)
Pen1
.
circle
(
r
,
180
)
Pen1
.
right
(
90
)
Pen1
.
right
(
90
)
Pen1
.
circle
(
50
,
180
)
Pen1
.
circle
(
r
,
180
)
Pen1
.
forward
(
100
)
Pen1
.
forward
(
2
*
r
)
Pen1
.
hideturtle
()
Pen1
.
hideturtle
()
turtle
.
done
()
turtle
.
done
()
\ No newline at end of file
diy2.py
0 → 100644
View file @
a244c5d4
import
turtle
pen
=
turtle
.
Pen
()
Screen
=
turtle
.
Screen
()
a
=
Screen
.
textinput
(
"提示"
,
"你想要多大的六芒星呀?"
)
size
=
int
(
a
)
Screen
.
bgcolor
(
"light yellow"
)
pen
.
hideturtle
()
pen1
=
turtle
.
Pen
()
pen1
.
pensize
(
5
)
pen1
.
pencolor
(
"light pink"
)
pen1
.
circle
(
size
)
pen1
.
circle
(
size
,
360
,
3
)
pen1
.
circle
(
size
,
60
)
pen1
.
circle
(
size
,
360
,
3
)
pen1
.
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