---
# System prepended metadata

title: Untitled

---

from microbit import *

def show_led(x, y):
  if x < 5 and x >=0 and y < 5 and y >= 0:
    display.set_pixel(x, y, 9)

x = 0
y = 0


for i in range(9):
  
  for j in range(i+1):
    if j < i - 4:
      continue
    if i % 2 == 0:
        print(x+j, y+(i-j))
        show_led(x+j, y+(i-j))
    else:
        print(x+(i-j), y+j)
        show_led(x+(i-j), y+j)
    sleep(100)
    
  
  print('---')
