#write micropython program to ctrl the on board led using on board switch
from machine import Pin
import time
led = Pin(2, Pin.OUT)
key = Pin(0, Pin.IN)
while True:
if key.value() == True:
led.value(True)
else:
led.value(False)