from machine import Pin
from time import sleep
l1=Pin(21,Pin,OUT)
l2=Pin(22,Pin,OUT)
l3=Pin(23,Pin,OUT)
buzz=Pin(18,Pin,OUT)
while True:
    l1.value(1)
    sleep(0,5)
    l2.value(0)
    l3.value(0)
    time.sleep(0,5)
    l1.value(1)
    l2.value(1)
    sleep(0,5)
    l3.value(0)
    time.sleep(0,5)
    l1.value(1)
    l2.value(1)
    l3.value(1)
    sleep(0,5)
    l1.value(0)
    l2.value(0)
    l3.value(0)
    time.sleep(0,5)
    if led1.value(1) and l2.value(1) and l3.value(1):
        buzz.value(1)
    else l3.value(0):
        buzz.value(0)