Skip to content

crwdns342183:0crwdne342183:0

crwdns312110:0crwdne312110:0

crwdns347531:0crwdne347531:0 | MakeCode, Python | crwdns255566:0crwdne255566:0, crwdns255570:0crwdne255570:0 | crwdns258516:0crwdne258516:0, crwdns258616:0crwdne258616:0, crwdns273624:0crwdne273624:0

crwdns256112:0crwdne256112:0

crwdns256114:0crwdne256114:0

crwdns256116:0crwdne256116:0

crwdns259518:0crwdne259518:0

crwdns274124:0crwdne274124:0

crwdns274126:0crwdne274126:0

crwdns259524:0crwdne259524:0

  • crwdns259526:0crwdne259526:0
  • crwdns259528:0crwdne259528:0
  • crwdns259530:0crwdne259530:0
  • crwdns259532:0crwdne259532:0
  • crwdns259534:0crwdne259534:0

crwdns259536:0crwdne259536:0

  • crwdns259538:0crwdne259538:0
  • crwdns259540:0crwdne259540:0
  • crwdns259542:0crwdne259542:0

crwdns259544:0crwdne259544:0

1from microbit import *
2
3count = 0
4display.show(count)
5
6while True:
7    if button_a.is_pressed() and button_b.is_pressed():
8        count = 0
9        display.scroll(count)
10    elif button_b.is_pressed():
11        count += 1
12        display.scroll(count)
13    elif button_a.is_pressed():
14        display.scroll(count)
15    sleep(100)

crwdns259546:0crwdne259546:0

  • crwdns259548:0crwdne259548:0
  • crwdns259550:0crwdne259550:0
  • crwdns259552:0crwdne259552:0
  • crwdns259554:0crwdne259554:0