import microbit while True: if microbit.pin11.read_digital()==0: microbit.pin8.write_digital(1) else: microbit.pin8.write_digital(0) if microbit.pin5.read_digital()==0: microbit.pin12.write_digital(1) else: microbit.pin12.write_digital(0) microbit.sleep(100)