본문 바로가기
프로그램/Python 1000제

Python 109제] 파이썬 EXPRESS CHAPTER 4. Programming 07. p199

by 건티 2022. 12. 9.
728x90

출처 : 반크_세계유산 경복궁

 

참고풀이]

Sin그래프 1)

import turtle
import math

t=turtle.Turtle()
t.shape("turtle")
t.color("red","yellow")

for x in range(0,360):
    t.goto(x,200*math.sin(x*3.14/180))

 

Sin그래프 2)

import turtle
import math

t=turtle.Turtle()
t.shape("turtle")
t.color("red","yellow")

t.penup()
t.goto(-180,0)
t.pendown()
for x in range(-180,180):
    t.goto(x,200*math.sin(x*3.14/180))

 

참고풀이 결과]

Sin그래프 1 결과)

 

Sin그래프 2 결과)

 

 

 

 

 

대한민국의 아름다운 영토, 독도의 봄

 

반응형

댓글