import sys
import os
import time
import turtle
import random


t = turtle.Pen()

##for dis in range(1,360):
##    t.forward(2)
##    t.left(1)

t.forward(50)
t.pencolor("green")
t.left(90)
t.forward(50)

cols = ["red","orange","green","yellow","blue","indigo","violet"]
num_cols = len(cols)
print("num_cols is",num_cols)

for num in range(20):
    rand = random.randrange(num_cols)
    print("rand is ",rand)
    t.pencolor(cols[rand])
    t.right(rand)
    t.forward(10)

col = t.pencolor()

print("pencolor =",col)
    
