from microbit import *

gauche = Image("00900:"
               "09000:"
               "99999:"
               "09000:"
               "00900:")

droite = Image("00900:"
               "00090:"
               "99999:"
               "00090:"
               "00900:")

while True:
    if accelerometer.was_gesture("right"):
        display.show(droite)
    if accelerometer.was_gesture("left"):
        display.show(gauche)