from Tkinter import *
import random
import time
color = ["green", "red", "blue", "orange", "yellow",
"pink", "purple", "violet", "magenta", "cyan"]
tk = Tk()
canvas = Canvas(tk, width = 400, height = 400)
canvas.pack()
def funcRandomTriangle():
x1 = random.randrange(400)
y1 = random.randrange(400)
x2 = random.randrange(400)
y2 = random.randrange(400)
x3 = random.randrange(400)
y3 = random.randrange(400)
fillcolor = random.randrange(10)
canvas.create_polygon(x1, y1, x2, y2, x3, y3,
fill = color[fillcolor], outline = "black")
for x in range(0, 15):
funcRandomTriangle()
time.sleep(1)