Complete the code to print a friendly greeting in Python.
print([1])
In Python, text must be inside quotes to be printed as a message.
Complete the code to create a list of three fruits.
fruits = [[1]]Lists need items separated by commas and each item as a string inside quotes.
Fix the error in the code to check if a number is even.
if number [1] 2 == 0: print("Even number")
The modulus operator % gives the remainder. If remainder is 0, number is even.
Fill both blanks to create a dictionary of squares for numbers 1 to 5.
squares = {x: x[1]2 for x in range(1, 6) if x [2] 2 != 0}Use ** for power and % to check if number is odd (remainder not zero).
Fill all three blanks to filter and transform a dictionary of words and their lengths.
result = [1]: [2] for word in words if len(word) [3] 3}
Use the word as key, its length as value, and filter words longer than 3 letters.
