Skip to content

crwdns342183:0crwdne342183:0

crwdns312502:0crwdne312502:0

crwdns347531:0crwdne347531:0 | MakeCode, Python | crwdns255566:0crwdne255566:0, crwdns255578:0crwdne255578:0 | crwdns258504:0crwdne258504:0, crwdns258562:0crwdne258562:0

crwdns257890:0crwdne257890:0

crwdns257892:0crwdne257892:0

crwdns257894:0crwdne257894:0

crwdns257896:0crwdne257896:0

crwdns257898:0crwdne257898:0

  • crwdns257900:0crwdne257900:0 crwdns257902:0crwdne257902:0 crwdns257904:0crwdne257904:0
  • crwdns257906:0crwdne257906:0
  • crwdns257908:0crwdne257908:0 crwdns257910:0crwdne257910:0
  • crwdns257912:0crwdne257912:0 crwdns257914:0crwdne257914:0
  • crwdns257916:0crwdne257916:0

crwdns257918:0crwdne257918:0

  • crwdns257920:0crwdne257920:0
  • crwdns257922:0crwdne257922:0
  • crwdns257924:0crwdne257924:0
  • crwdns257926:0crwdne257926:0

crwdns257928:0crwdne257928:0

1from microbit import *
2import random
3
4while True:
5    if accelerometer.was_gesture('shake'):
6        number = random.randint(1, 3)
7        if number == 3:
8            display.show(Image.YES)
9        elif number == 2:
10            display.show(Image.NO)
11        else:
12            display.show(Image.MEH)

crwdns257930:0crwdne257930:0

  • crwdns257932:0crwdne257932:0
  • crwdns257934:0crwdne257934:0 crwdns257936:0crwdne257936:0
  • crwdns257938:0crwdne257938:0