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
973526e8
authored
3 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
a4d6e8cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
19 deletions
diy1.py
diy1.py
View file @
973526e8
import
turtle
import
random
d
=
random
.
randint
(
10
,
250
)
def
draw_ax
(
d
,
fill
,
color
,
fill_color
,
pen_size
):
pen2
=
turtle
.
Pen
()
pen2
.
pencolor
(
color
)
pen2
.
pensize
(
pen_size
)
pen2
.
setheading
(
45
)
pen2
.
fillcolor
(
fill_color
)
pen2
.
begin_fill
()
pen2
.
forward
(
d
)
pen2
.
circle
(
d
/
2
,
180
)
pen2
.
right
(
90
)
pen2
.
circle
(
d
/
2
,
180
)
pen2
.
forward
(
d
)
if
fill
==
True
:
pen2
.
end_fill
()
pen2
.
hideturtle
()
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"pink"
)
pen
=
turtle
.
Pen
()
pen
.
penup
()
pen
.
goto
(
100
,
-
100
)
pen
.
write
(
"Hello Turtle"
,
font
=
(
"
fixedsys
"
,
40
,
"normal"
))
pen
.
write
(
"Hello Turtle"
,
font
=
(
"
Ink Free
"
,
40
,
"normal"
))
pen
.
hideturtle
()
draw_ax
(
d
,
True
,
"red"
,
"red"
,
5
)
pen2
=
turtle
.
Pen
()
pen2
.
pencolor
(
"red"
)
pen2
.
pensize
(
5
)
pen2
.
setheading
(
45
)
pen2
.
forward
(
100
)
pen2
.
circle
(
50
,
180
)
pen2
.
right
(
90
)
pen2
.
circle
(
50
,
180
)
pen2
.
forward
(
100
)
pen2
.
hideturtle
()
turtle
.
done
()
\ 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