import turtle,time import random def drawLine(draw): colors = ['red','black', 'green', 'blue', 'yellow', 'purple','mauve','scarlet'] a=random.randint(1,8) turtle.pencolor(colors[8%a]) turtle.penup() turtle.fd(5) turtle.pendown() if draw else turtle.penup() turtle.fd(35)