Complete the code to import the PWMLED class from gpiozero.
from gpiozero import [1]
We import PWMLED to control LED brightness using pulse-width modulation.
Complete the code to create a PWMLED object on GPIO pin 17.
led = PWMLED([1])GPIO pin 17 is used to connect the LED for brightness control.
Fix the error in setting the LED brightness to 50%.
led.value = [1]The brightness value must be between 0.0 (off) and 1.0 (full brightness). 50% brightness is 0.5.
Fill both blanks to create a dictionary of LED brightness for words longer than 3 letters.
brightness = {word: [1] for word in words if len(word) [2] 3}We use len(word) to get brightness and filter words longer than 3 with >.
Fill all three blanks to create a dictionary mapping uppercase words to brightness values greater than 0.3.
brightness = [1]: [2] for word in words if [2] [3] 0.3}
word as the value instead of len(word)Keys are uppercase words (word.upper()), values are brightness (len(word)), filtered by brightness > 0.3.