from microbit import *

def countdown():
    for value in [3, 2, 1]:
        display.show(str(value))
        sleep(1000)
    display.show("0")

while True:
    if button_a.is_pressed() or button_b.is_pressed():
        countdown()
    else:
        display.show(Image.SAD)
    sleep(30)
