Complete the code to import the library needed to work with the Raspberry Pi camera.
import [1]
The picamera library is used to control the Raspberry Pi camera module.
Complete the code to start the camera preview so you can see what the camera sees.
camera = picamera.PiCamera()
camera.[1]()The start_preview() method shows the camera's live view on the screen.
Fix the error in the code to capture an image and save it as 'image.jpg'.
camera.capture([1])The filename must be a string, so it needs quotes like 'image.jpg'.
Fill both blanks to create a dictionary comprehension that stores the length of each word longer than 3 letters.
lengths = {word: [1] for word in words if len(word) [2] 3}The dictionary stores word lengths, so use len(word). The condition checks words longer than 3, so use >.
Fill all three blanks to create a dictionary comprehension that stores uppercase words and their lengths only if length is greater than 4.
result = [1]: [2] for word in words if len(word) [3] 4}
The key is the uppercase word (word.upper()), the value is the length (len(word)), and the condition checks length greater than 4 (>).
