Complete the code to print a message automatically.
print([1])
The print function needs a string inside quotes to display text automatically.
Complete the code to repeat a task 3 times automatically.
for i in range([1]): print("Task", i + 1)
The range(3) makes the loop run 3 times, automating the repeated task.
Fix the error in the code to automate adding two numbers.
result = num1 [1] num2 print(result)
The plus sign (+) adds two numbers, automating the addition task.
Fill both blanks to automate filtering even numbers from a list.
evens = [x for x in numbers if x [1] 2 == [2]]
The modulus operator (%) finds the remainder. Even numbers have remainder 0 when divided by 2.
Fill all three blanks to automate creating a dictionary of word lengths for words longer than 3 letters.
lengths = [2]: [2] for [3] in words if len({{BLANK_4}}) > 3
The dictionary comprehension starts with '{', uses the word as key, and its length as value for words longer than 3 letters.