공부 | Study/Python
2021. 3. 19.
#7 [프로그래밍2] 파이썬의 turtle의 색을 원하는 색으로 반복하기
이 그림이 나오도록 기능을 구현하는 것이 오늘 목표이다. import turtle import random ## 함수 선언 ## def screenLeftClick(x, y): global r, g, b turtle.pencolor((r, g, b)) turtle.pendown() turtle.goto(x,y) def screenRightClick(x, y): turtle.penup() turtle.goto(x,y) def screenMidClick(x, y): global r, g, b tSize = random.randrange(1, 10) turtle.shapesize(tSize) global ClickNum ClickNum = ClickNum + 1 if ClickNum == 1: r, g, b ..