from machine import Pin #PULL DOWN RESISTOR
from time import sleep
led = Pin(16, Pin.OUT) # 16 number in is Output
push_button = Pin(13, Pin.IN, Pin.PULL_DOWN) # 13 number pin is input
while True:
if push_button.value() == 1: # if push_button pressed
led.value(1) # led will turn ON
else: # if push_button not pressed
led.value(0) # led will turn OFF