
"""


Auteur: anonyme

Interface: microbit

Nom du projet: Jouer aux dés

Description: No-description

Toolbox: vittascience

Mode: mixed

Blocks: <xml xmlns="https://developers.google.com/blockly/xml"><block type="on_start" id="G[=T#8yqB70`NFgYq}GP" deletable="false" x="-388" y="37"></block><block type="forever" id="o[WN]+eeF.OUxGch67@8" x="-63" y="112"><statement name="DO"><block type="io_onMovement" id="Ci~-/.7w2d+N];?ryRq4"><field name="MOV">shake</field><statement name="DO"><block type="show_number" id="S~*8t=fKelw%tOnJDsW{"><value name="VALUE"><shadow type="math_number" id="C}uG;IQGavRp6^}/9AS:"><field name="NUM">0</field></shadow><block type="math_random_int" id="vDgHF3MN%tSdxN4hxFv7"><value name="FROM"><shadow type="math_number" id="Z-|/`x$=z$D1nXqV+ct3"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number" id="nci^~FbCYSI2tqcXv4K$"><field name="NUM">6</field></shadow></value></block></value></block></statement></block></statement></block></xml>

Projet généré par Vittascience.

Ce fichier contient le code textuel ainsi que le code blocs. Il peut être importé de nouveau

sur l'interface http://vittascience.com/microbit


"""

from microbit import *
import random

while True:
  if accelerometer.current_gesture() == 'shake' :
    display.show(random.randint(1, 6))
