from turtle import * from random import randint from ion import * def nouveau(n): reset() cotes = [(randint(-140,140), randint(-90,90)) for _ in range(n)] cotes.append(cotes[0]) showturtle() for i, (x,y) in enumerate(cotes): if i == 0: penup() pensize(1) goto(x,y) pendown() pensize(4) goto(x,y) hideturtle() def go(): n = 3 nouveau(n) while True: if keydown(KEY_RIGHT): n += 1 nouveau(n) elif keydown(KEY_LEFT): n = max(3, n - 1) nouveau(n) go()