# write a micropython script for internal pull up with push button
from machine import Pin
from time import sleep
led = Pin(2, Pin.OUT)
switch = Pin(0,Pin.IN,Pin.PULL_UP)
while True:
x = switch.value()
print(x)
if x==0:
led.on()
else:
led.off()