May-03-2025, 02:17 AM
Hello, im currently doing the grok academy sport microbit course and im up to ‘Tilt Both ways’ an activity in module 5. I have cleared most of the tests besides the test thats states ‘Testing many different values.’ it said i failed that test because ‘Display was showing Image.ARROW_S.’
My Current code is as follows:
My Current code is as follows:
from microbit import * while True: if accelerometer.get_y() > 500: display.show(Image.ARROW_S) elif accelerometer.get_y() < -500: display.show(Image.ARROW_N) if accelerometer.get_x() > 500: display.show(Image.ARROW_E) elif accelerometer.get_x() < -500: display.show(Image.ARROW_W) elif accelerometer.get_y() == 0 and accelerometer.get_x()== 0: display.show(Image.TARGET)what am i doing wrong? (btw this is my first time using this website and i just copy pasted the code straight into this so the indentation isnt showing up but im fairly sure i have the correct indentaion)