Last active
November 23, 2018 10:16
-
-
Save rudrathegreat/f42e1ca01c81ea9973e4653b60c16085 to your computer and use it in GitHub Desktop.
Simplified Version of Dice.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' This program only works on the | |
BBC Microbit. If you would like to view | |
Dice.py, then just use the link below - | |
https://gist.github.com/rudrathegreat/ed7db24af713ae8d42444bc0816d19c6 | |
''' | |
from microbit import * | |
import random | |
while True: | |
if accelerometer.was_gesture('shake'): | |
display.clear() | |
number = random.randint(1,6) | |
display.show(str(number)) | |
sleep(2000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment