Complete the code to import the gpiozero library.
from gpiozero import [1]
The LED class is part of gpiozero and is used to control an LED easily.
Complete the code to create an LED object on GPIO pin 17.
led = LED([1])GPIO pin 17 is commonly used and matches the example to control the LED.
Fix the error in the code to turn the LED on.
led.[1]()The on() method turns the LED on in gpiozero.
Fill both blanks to create a Button on pin 2 and check if it is pressed.
button = Button([1]) if button.[2]: print('Pressed!')
The Button class uses pin 2 here, and is_pressed is the property to check if the button is pressed.
Fill all three blanks to create a PWMLED on pin 18, set brightness to 50%, and turn it on.
pwm_led = PWMLED([1]) pwm_led.[2] = [3] pwm_led.on()
Pin 18 is used for PWMLED, brightness controls the light level, and 0.5 sets it to 50% brightness.
