Skip to content

crwdns342183:0crwdne342183:0

crwdns312278:0crwdne312278:0

crwdns347531:0crwdne347531:0 | MakeCode, Python | crwdns255566:0crwdne255566:0, crwdns255578:0crwdne255578:0 | crwdns258502:0crwdne258502:0, crwdns258562:0crwdne258562:0, crwdns258616:0crwdne258616:0, crwdns293304:0crwdne293304:0, crwdns293308:0crwdne293308:0

crwdns256850:0crwdne256850:0

crwdns256852:0crwdne256852:0

crwdns259338:0crwdne259338:0

crwdns259340:0crwdne259340:0

crwdns274224:0crwdne274224:0

crwdns274226:0crwdne274226:0

crwdns259346:0crwdne259346:0

  1. crwdns259348:0crwdne259348:0
  2. crwdns259350:0crwdne259350:0
  3. crwdns259352:0crwdne259352:0
  4. crwdns259354:0crwdne259354:0 crwdns259356:0crwdne259356:0 crwdns259358:0crwdne259358:0

crwdns259360:0crwdne259360:0

  • crwdns259362:0crwdne259362:0
  • crwdns259364:0crwdne259364:0
  • crwdns259366:0crwdne259366:0
  • crwdns259368:0crwdne259368:0

crwdns259370:0crwdne259370:0

1from microbit import *
2import random
3
4while True:
5    if accelerometer.was_gesture('shake'):
6        display.show(random.randint(1, 6))

crwdns259372:0crwdne259372:0

  • crwdns259374:0crwdne259374:0
  • crwdns259376:0crwdne259376:0 crwdns259378:0crwdne259378:0
  • crwdns259380:0crwdne259380:0 crwdns259382:0crwdne259382:0 crwdns259384:0crwdne259384:0