출처 : 반크_반크 20년 백서
8.
참고풀이]
import turtle
t=turtle.Turtle()
t.shape("turtle")
t.pensize(6)
radius=100
t.up()
t.goto(-200,0)
t.down()
t.color("blue")
t.circle(radius)
t.up()
t.goto(20,0)
t.down()
t.color("black")
t.circle(radius)
t.up()
t.goto(240,0)
t.down()
t.color("red")
t.circle(radius)
t.up()
t.goto(-90,-120)
t.down()
t.color("yellow")
t.circle(radius)
t.up()
t.goto(130,-120)
t.down()
t.color("green")
t.circle(radius)
참고풀이 결과]
9.
참고풀이]
import turtle
t=turtle.Turtle()
s1=60 #가로, x위치
s2=40 #세로, y위치
s3=30 #반지름
t.up()
t.goto(-s1,s2)
t.down()
t.color("purple")
t.begin_fill()
t.forward(s1*2)
t.right(90)
t.forward(s2)
t.right(90)
t.forward(s1*2)
t.right(90)
t.forward(s2)
t.end_fill()
t.up()
t.goto(-s1*2,0)
t.down()
t.color("blue")
t.begin_fill()
t.right(90)
t.forward(s1*4)
t.right(90)
t.forward(s2*2)
t.right(90)
t.forward(s1*4)
t.right(90)
t.forward(s2*2)
t.end_fill()
t.up()
t.goto(-s1+(s1/2),-s2*2)
t.down()
t.color("black")
t.begin_fill()
t.circle(s3)
t.end_fill()
t.up()
t.goto(s1+(s1/2),-s2*2)
t.down()
t.color("black")
t.begin_fill()
t.circle(s3)
t.end_fill()
참고풀이 결과]
대한민국의 아름다운 영토, 독도의 여름
'프로그램 > Python 1000제' 카테고리의 다른 글
Python 213제] 두근두근 파이썬(개정판) CHAPTER 3 연습문제 p96 (0) | 2023.09.25 |
---|---|
Python 212제] 두근두근 파이썬(개정판) CHAPTER 3 도전문제 (1) | 2023.09.18 |
Python 210제] 두근두근 파이썬(개정판) CHAPTER 2 연습문제 p70 (0) | 2023.09.11 |
Python 209제] 두근두근 파이썬(개정판) CHAPTER 2 연습문제 p69 (0) | 2023.09.11 |
Python 208제] 두근두근 파이썬(개정판) CHAPTER 2. 도전문제 (0) | 2023.08.14 |
댓글