from machine import Pin
from utime import sleep
led = Pin(16, Pin.OUT)
button = Pin(14, mode= Pin.IN, pull = Pin.PULL_UP)
while True:
if button.value() == 0:
led.value(1)
print("LED is ON")
sleep(0.3)
elif button.value() == 1:
led.value(0)
'''print("LED is OFF")'''
sleep(0.3)