I made this short code for a school project using a Microbit computer, however, when I press the a button when the count is 1, the count jumps to 16 and I can't figure out why.
count = (1)
while True:
gesture = accelerometer.current_gesture()
display.show(count)
if button_a.is_pressed():
count *= (2)
if button_b.is_pressed():
count += (1)
if gesture == "shake":
count = (1)
any help would be greatly appreciated!