Raspberry Pi - gpiozero Library
What will be the output of this code snippet controlling an LED?
from gpiozero import LED
from time import sleep
led = LED(22)
led.on()
sleep(1)
led.off()
print('LED state:', led.is_lit)What will be the output of this code snippet controlling an LED?
from gpiozero import LED
from time import sleep
led = LED(22)
led.on()
sleep(1)
led.off()
print('LED state:', led.is_lit)led.off(), led.is_lit is False, so output is 'LED state: False'.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions