from machine import Pin
led = Pin(15, Pin.OUT)
push_button = Pin(13, Pin.IN)
while True: #infinite loop
logic_state=push_button.value() #storing the value of the push button state in the variable logic_state
if logic_state==True: #if state of button is logic 1
led.value(1) #LED is ON
print("led on")
else:
led.value(0) #LED is OFF
print("led off")