Skip to content

crwdns342183:0crwdne342183:0

crwdns312554:0crwdne312554:0

crwdns347529:0crwdne347529:0 | MakeCode, Python | crwdns255562:0crwdne255562:0, crwdns255566:0crwdne255566:0 | crwdns258480:0crwdne258480:0, crwdns258500:0crwdne258500:0, crwdns258536:0crwdne258536:0, crwdns258584:0crwdne258584:0, crwdns258600:0crwdne258600:0, crwdns258616:0crwdne258616:0, crwdns258618:0crwdne258618:0

crwdns258168:0crwdne258168:0

crwdns258170:0crwdne258170:0

crwdns258172:0crwdne258172:0

crwdns258174:0crwdne258174:0

crwdns258176:0crwdne258176:0

  • crwdns258178:0crwdne258178:0
  • crwdns258180:0crwdne258180:0
  • crwdns258182:0crwdne258182:0
  • crwdns258184:0crwdne258184:0 crwdns258186:0crwdne258186:0 crwdns258188:0crwdne258188:0
  • crwdns258190:0crwdne258190:0

crwdns258192:0crwdne258192:0

  • crwdns258194:0crwdne258194:0
  • crwdns258196:0crwdne258196:0
  • crwdns258198:0crwdne258198:0

crwdns258200:0crwdne258200:0

1from microbit import *
2import random
3
4while True:
5    gameStarted = False
6    sleep(random.randint(1000, 5000))
7    gameStarted = True
8    display.show(Image.HEART)
9    while gameStarted:
10        if pin1.is_touched():
11            display.show('A')
12            gameStarted = False
13        elif pin2.is_touched():
14            display.show('B')
15            gameStarted = False
16    sleep(3000)
17    display.clear()
18

crwdns258202:0crwdne258202:0

  • crwdns258204:0crwdne258204:0
  • crwdns258206:0crwdne258206:0
  • crwdns258208:0crwdne258208:0