Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-4-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
ec105d6a
authored
Jan 01, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
ab3df9c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
diy1.py
quiz1.py
diy1.py
View file @
ec105d6a
import
turtle
import
random
d
=
random
.
randint
(
10
,
250
)
def
draw_ax
(
d
,
fill
,
color
,
fill_color
,
pen_size
):
def
draw_ax
(
d
,
fill
,
color
,
fill_color
,
pen_size
,
pen_X
,
pen_Y
):
pen2
=
turtle
.
Pen
()
pen2
.
penup
()
pen2
.
goto
(
pen_X
,
pen_Y
)
pen2
.
pendown
()
pen2
.
pencolor
(
color
)
pen2
.
pensize
(
pen_size
)
pen2
.
setheading
(
45
)
...
...
@@ -18,10 +19,11 @@ def draw_ax(d,fill,color,fill_color,pen_size):
pen2
.
hideturtle
()
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"pink"
)
d
=
int
(
screen
.
textinput
(
"问题"
,
"画的爱心的半径是"
))
pen
=
turtle
.
Pen
()
pen
.
penup
()
pen
.
goto
(
100
,
-
100
)
pen
.
write
(
"Hello Turtle"
,
font
=
(
"fixedsys"
,
40
,
"normal"
))
pen
.
hideturtle
()
draw_ax
(
d
,
True
,
"red"
,
"red"
,
5
)
draw_ax
(
d
,
True
,
"red"
,
"red"
,
5
,
0
,
0
)
turtle
.
done
()
\ No newline at end of file
quiz1.py
0 → 100644
View file @
ec105d6a
import
turtle
s
=
turtle
.
Screen
()
s
.
textinput
(
"问题"
,
"我帅吗"
)
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