from machine import Pin 

gumbg=Pin(5,Pin.IN,Pin.PULL_UP)
gumbr=Pin(18,Pin.IN,Pin.PULL_UP)
ledg=Pin(16,Pin.OUT)
ledr=Pin(4,Pin.OUT)

while True:
    if not gumbg.value()==1:
        ledg.value(1)
    else:
        ledg.value(0)
    if not gumbr.value()==1:
        ledr.value(1)
    else:
        ledr.value(0)