Skip to content

crwdns342183:0crwdne342183:0

crwdns312164:0crwdne312164:0

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

crwdns256402:0crwdne256402:0

crwdns256404:0crwdne256404:0

crwdns256406:0crwdne256406:0

crwdns336758:0crwdne336758:0

crwdns336760:0crwdne336760:0

crwdns336762:0crwdne336762:0

crwdns336764:0crwdne336764:0

  • crwdns336766:0crwdne336766:0 crwdns336768:0crwdne336768:0 crwdns336770:0crwdne336770:0
  • crwdns336772:0crwdne336772:0
  • crwdns336774:0crwdne336774:0
  • crwdns336776:0crwdne336776:0 crwdns336778:0crwdne336778:0 crwdns336780:0crwdne336780:0

crwdns336782:0crwdne336782:0

  • crwdns336784:0crwdne336784:0
  • crwdns336786:0crwdne336786:0
  • crwdns336788:0crwdne336788:0
  • crwdns336790:0crwdne336790:0

crwdns336792:0crwdne336792:0

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

crwdns336794:0crwdne336794:0

  • crwdns336796:0crwdne336796:0
  • crwdns336798:0crwdne336798:0
  • crwdns336800:0crwdne336800:0