Trojuholníky stredovo symetrické

import tkinter

canvas = tkinter.Canvas()
canvas.pack()
farba1,farba2,farba3 = 'blue', 'red','black'
for prem in range(6):
      a = (150+1/2*prem*20, 150+prem*20)
      b = (150+1/2*prem*20, 350-1/2*prem*20)
      c = (350-prem*20, 350-1/2*prem*20)
      canvas.create_line(a, b, c, a, fill=farba1)
      farba1,farba2,farba3 = farba3, farba1, farba2
tkinter.mainloop()
naspäť