Skip to content

crwdns342183:0crwdne342183:0

crwdns312330:0crwdne312330:0

crwdns347531:0crwdne347531:0 | MakeCode, Python | crwdns255566:0crwdne255566:0, crwdns255570:0crwdne255570:0 | crwdns258504:0crwdne258504:0, crwdns258516:0crwdne258516:0, crwdns258562:0crwdne258562:0

crwdns257118:0crwdne257118:0

crwdns257120:0crwdne257120:0

crwdns257122:0crwdne257122:0 crwdns257124:0crwdne257124:0

crwdns259438:0crwdne259438:0

crwdns274254:0crwdne274254:0

crwdns274256:0crwdne274256:0

crwdns259444:0crwdne259444:0

  • crwdns259446:0crwdne259446:0
  • crwdns259448:0crwdne259448:0
  • crwdns259450:0crwdne259450:0 crwdns259452:0crwdne259452:0
  • crwdns259454:0crwdne259454:0

crwdns259456:0crwdne259456:0

  • crwdns259458:0crwdne259458:0
  • crwdns259460:0crwdne259460:0
  • crwdns259462:0crwdne259462:0

crwdns259464:0crwdne259464:0

1from microbit import *
2import random
3
4while True:
5    if button_a.is_pressed():
6        random_number = random.randint(1, 6)
7        if random_number == 1:
8            display.scroll('PE with Joe')
9        elif random_number == 2:
10            display.scroll('watch a movie')
11        elif random_number == 3:
12            display.scroll('play a board game')
13        elif random_number == 4:
14            display.scroll('tidy our rooms')
15        elif random_number == 5:
16            display.scroll('play a card game')
17        else:
18            display.scroll('learn a song')

crwdns259466:0crwdne259466:0

  • crwdns259468:0crwdne259468:0
  • crwdns259470:0crwdne259470:0
  • crwdns259472:0crwdne259472:0