# write a Micropython program to internal pullup
from machine import Pin
from time import sleep
switch=Pin(4,Pin.IN,Pin.PULL_UP)
led=Pin(19,Pin.OUT)
while True:
x=switch.value()
if x==0:
led.value(1)
else:
led.value(0)