Complete the code to create an array of size 5 initialized with zeros.
arr = [[1]] * 5 print(arr)
The array is initialized with zeros by using 0 inside the list multiplied by 5.
Complete the code to access the third element of the array.
arr = [10, 20, 30, 40, 50] print(arr[[1]])
Arrays start at index 0, so the third element is at index 2.
Fix the error in the code to append an element to the array.
arr = [1, 2, 3] arr.[1](4) print(arr)
The correct method to add an element at the end of a list (array) is append.
Fill both blanks to create a list of squares for numbers 1 to 5, but only include squares greater than 10.
squares = [x[1]2 for x in range(1, 6) if x[2]3] print(squares)
Use ** to square the number and > to filter numbers greater than 3.
Fill all three blanks to create a dictionary with keys as uppercase letters and values as their ASCII codes, but only for letters with ASCII code greater than 65.
result = { [1]: [2] for letter in ['a', 'B', 'C', 'd', 'E'] if ord(letter) [3] 65 }
print(result)Use letter.upper() as keys, ord(letter) as values, and filter letters with ASCII code greater than 65.