Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python_study
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Minseong Kwon
python_study
Commits
10ec49cb
Commit
10ec49cb
authored
6 years ago
by
Minseong Kwon
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
1ba997eb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tu.test.py
+117
-0
117 additions, 0 deletions
tu.test.py
with
117 additions
and
0 deletions
tu.test.py
0 → 100644
+
117
−
0
View file @
10ec49cb
import
turtle
as
t
t
.
shape
(
"
turtle
"
)
t
.
pensize
(
3
)
# 펜 굵기 설정
t
.
speed
(
10
)
# 스피드 조정
t
.
penup
()
# 펜을 들기
k
=-
200
# 처음 x좌표를 -200으로설정
t
.
goto
(
k
,
-
50
)
# -200.-50으로 좌표이동
t
.
pendown
()
# 다시 펜을 들어올린다.
t
.
color
(
"
blue
"
)
#이중 for문을 이용하여 도형 여러개 그리기
for
i
in
range
(
5
):
k
=
k
+
100
# 도형 하나를 그릴 때마다 x축으로 100씩 평행이동
for
j
in
range
(
4
):
t
.
forward
(
60
)
t
.
left
(
90
)
t
.
penup
()
t
.
goto
(
k
,
-
50
)
t
.
pendown
()
#for 여러개 사용하여 다양한 도형 그리기
t
.
penup
()
t
.
goto
(
-
200
,
-
200
)
t
.
pendown
()
t
.
begin_fill
()
t
.
color
(
"
red
"
)
#삼각형그리기
for
i
in
range
(
3
):
t
.
forward
(
60
)
t
.
left
(
120
)
t
.
end_fill
()
t
.
penup
()
t
.
goto
(
-
100
,
-
200
)
t
.
pendown
()
t
.
begin_fill
()
t
.
color
(
"
green
"
)
#사각형 그리기
for
i
in
range
(
4
):
t
.
forward
(
60
)
t
.
left
(
90
)
t
.
end_fill
()
#5각형그리기
t
.
penup
()
t
.
goto
(
0
,
-
200
)
t
.
pendown
()
t
.
begin_fill
()
t
.
color
(
"
blue
"
)
for
i
in
range
(
5
):
t
.
forward
(
40
)
t
.
left
(
72
)
t
.
end_fill
()
#6각형 그리기
t
.
penup
()
t
.
goto
(
100
,
-
200
)
t
.
pendown
()
t
.
begin_fill
()
t
.
color
(
"
black
"
)
for
i
in
range
(
6
):
t
.
forward
(
40
)
t
.
left
(
60
)
t
.
end_fill
()
#원그리기
t
.
penup
()
t
.
goto
(
230
,
-
200
)
t
.
pendown
()
t
.
begin_fill
()
t
.
color
(
"
orange
"
)
t
.
circle
(
40
)
t
.
end_fill
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment