from microbit import *
display.show(Image.HEART)
while True:
if button_a.is_pressed():
display.show(Image.HAPPY)
elif button_b.is_pressed():
display.show(Image.SAD)
from microbit import *
display.show(Image.HEART)
while True:
if button_a.is_pressed():
display.show(Image.HAPPY)
elif button_b.is_pressed():
display.show(Image.SAD)
elif button_a.is_pressed() and button_b.is_pressed():
display.show(Image.HEART)
from microbit import *
display.show(Image.HEART)
while True:
if button_a.is_pressed() and button_b.is_pressed():
display.show(Image.HEART)
elif button_a.is_pressed():
display.show(Image.HAPPY)
elif button_b.is_pressed():
display.show(Image.SAD)
from microbit import *
display.show(Image.HEART)
while True:
if button_a.is_pressed() and button_b.is_pressed():
display.show(Image.HEART)
sleep(1000)
elif button_a.is_pressed():
display.show(Image.HAPPY)
elif button_b.is_pressed():
display.show(Image.SAD)
from microbit import *
for i in range(9, -1, -1):
display.show(i)
sleep(1000)
display.show(Image.HEART)
sleep(1000)
number = button_a.get_presses()
display.show(number)