import machine
import time
# Set pin 0 as an output
led = machine.Pin(0, machine.Pin.OUT)
a = 10
# Make your led blink 5 times (=10/2 because toggle)
while a > 0:
a -= 1 # equivalent to a=a-1
led.toggle() # Change LED's status
time.sleep(0.5) # Wait for 0.5 seconds