# -*- coding: utf-8 -*-
"""
Created on Wed Oct 22 11:29:55 2025

@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)

taillemax = int(input("Quelle taille max ? "))
variation = int(input("Quelle variation de taille ? "))

def losange(taille):
    for i in range (2):
        forward(taille)
        right(60)
        forward(taille)
        right(120)

for i in range(taillemax,1,-variation):
    fillcolor(randint(0, 255),randint(0, 255),randint(0, 255))
    begin_fill()
    losange(i)
    end_fill()
    right(360/(taillemax/variation))
   
done()