# Add your Python code here. E.g.
from microbit import *
import random

tyhja = Image("00000:"
              "00000:"
              "00000:"
              "00000:"
              "00000")
              
faces = [Image.DIAMOND, Image.SWORD, Image.SQUARE, tyhja]

while True:
    display.show(tyhja)
    luku = random.randint(0, 2)
    if button_a.is_pressed():
        display.show(faces, loop=False, delay=500)
        
    if button_b.is_pressed():
        sleep(500)
        display.show(faces[luku])
        sleep(3000)
