from machine import Pin
from time import sleep
switch1 = Pin(2, Pin.IN)
switch2 = Pin(3, Pin.IN)
led = Pin(14, Pin.OUT)
while True:
sw1_state_val = switch1.value()
sw2_state_val = switch2.value()
print("Switch 1 state : ", sw1_state_val)
print("Switch 2 state : ", sw2_state_val)
if sw1_state_val == 1 and sw2_state_val == 1:
led(1)
else:
led(0)
sleep(0.1)