# -*- coding: utf-8 -*-
"""
Created on Mon Sep 26 12:16:41 2022

@author: vince
"""
from turtle import *
from random import *

shape("turtle")
screensize(1000,1000) # ne fonctionne pas dans Trinket
reset()
shapesize(.5,.5,0)
bgcolor("black")
color("white")
clear()
speed(10)
colormode(255)


longueur = int(input("Entrez la longueur des cotés : "))
cotes = int(input("Entrez le nombre maximum de cotés : "))

def poly(long,cot):
    for j in range (cot):
        forward(long)
        left(360/cot)

for i in range (cotes,2,-1):
    fillcolor(randint(0, 255),randint(0, 255),randint(0, 255))
    begin_fill()
    poly(longueur,i1)
    end_fill()

done()