Complete the code to define a transition condition that triggers when variable x is greater than 5.
if x [1] 5: transition = True
The transition condition triggers when x is greater than 5, so the correct operator is >.
Complete the code to set the action variable to 'start' when the condition is true.
if condition: action = [1]
The action should be set to 'start' when the condition is true, so the correct string is 'start'.
Fix the error in the transition condition to correctly check if speed is less than or equal to 10.
if speed [1] 10: transition = True
The condition should check if speed is less than or equal to 10, so the operator is <=.
Fill both blanks to create a dictionary comprehension that maps each word to its length only if the length is greater than 3.
{word: [1] for word in words if [2]The dictionary comprehension maps each word to its length using len(word). The condition filters words with length greater than 3 using len(word) > 3.
Fill all three blanks to create a dictionary comprehension that maps uppercase keys to values only if the value is positive.
result = { [1]: [2] for k, v in data.items() if v [3] 0 }The keys are converted to uppercase with k.upper(), the values are v, and the condition checks if v is greater than 0 using >.
