from machine import Pin 
from time import sleep
led = Pin(2, Pin.OUT)
button = Pin(35, Pin.IN, Pin.PULL_UP)

while True:
    button_state = button.value()
    if button_state == 0:
        led.on()
    else:
        led.off()
    sleep(0.1)