import turtle
import random
## 전역 변수 부분 ##
swidth, sheight, pSize = 500, 500, 3
r, g, b, angle, dist, = 0, 0, 0, 30, 5 # 각도를 30도로 설정
## 메인 함수 부분 ##
turtle.title('거북이로 소라 그리기')
turtle.shape('turtle')
turtle.pensize(pSize)
turtle.setup(width = swidth + 30, height = sheight + 30)
turtle.screensize(swidth, sheight)
for i in range(80) :
turtle.pencolor("red")
turtle.pencolor("orange")
turtle.pencolor("yellow")
turtle.pencolor("green")
turtle.pencolor("blue")
turtle.pencolor("navy")
turtle.pencolor("purple")
turtle.pencolor("black")
dist += 1 # 그리는 선의 길이를 1씩 증가
turtle.forward(dist)
turtle.left(angle) # 왼쪽으로 30도 씩 회전
turtle.done()
여기서 순서대로 빨간색부터 검은색으로 바뀌게 하고싶은데 어떻게 적용해야하나요???