#sumador
import machine
from machine import Pin
number0 = Pin(4, Pin.IN, Pin.PULL_UP) # A
number1 = Pin(5, Pin.IN, Pin.PULL_UP) # B
number2 = Pin(6, Pin.IN, Pin.PULL_UP) # C
led0 = Pin(0, Pin.OUT) # L0
led1 = Pin(1, Pin.OUT) # L1
while True:
A = number0.value()
B = number1.value()
C = number2.value()
L0 = ((C and not B and not A) or (not C and not B and A) or (C and B and A) or (not C and B and not A))
L1 = ((C and A) or (B and A) or (C and B))
led0.value(L0)
led1.value(L1)