Complete the code to print a message on the display.
print([1])
The print function needs a string inside quotes to show text on the display.
Complete the code to clear the display before showing new text.
display.[1]()show() instead of clear().The clear() method removes old content from the display so new text can be shown clearly.
Fix the error in the code to update the display with new text.
display.[1]("New message")
print() which does not update the display hardware.clear() which erases content instead of showing it.The update() method refreshes the display to show the new message after setting it.
Fill both blanks to create a dictionary showing word lengths only for words longer than 3 letters.
lengths = {word: [1] for word in words if len(word) [2] 3}word instead of len(word) for the value.< instead of > in the condition.The dictionary comprehension uses len(word) to get length and filters words with length greater than 3 using >.
Fill all three blanks to create a dictionary with uppercase keys and values greater than zero.
result = { [1]: [2] for k, v in data.items() if v [3] 0 }k instead of k.upper() for keys.< or == instead of > in the condition.The keys are converted to uppercase with k.upper(), values are v, and only values greater than zero are included using >.
