二维数组点亮led灯
def on_button_pressed_a():
global num, x, y
num += 1
x = (num - 1) % 5
y = (num - 1) / 5
led.plot(x, y)
input.on_button_pressed(Button.A, on_button_pressed_a)
def on_button_pressed_b():
global num
basic.clear_screen()
num = 0
input.on_button_pressed(Button.B, on_button_pressed_b)
y = 0
x = 0
num = 0
basic.show_icon(IconNames.HEART)
basic.pause(500)
basic.clear_screen()
num = 0