Complete the code to create a NumPy array from a list.
import numpy as np arr = np.[1]([1, 2, 3, 4]) print(arr)
Use np.array() to create a NumPy array from a list.
Complete the code to calculate the mean of a NumPy array.
import numpy as np arr = np.array([10, 20, 30, 40]) mean_value = arr.[1]() print(mean_value)
Use mean() method on a NumPy array to calculate the average value.
Fix the error in the code to create a NumPy array of zeros with length 5.
import numpy as np zeros = np.[1](5) print(zeros)
The correct function to create an array of zeros is np.zeros().
Fill both blanks to create a NumPy array and calculate its standard deviation.
import numpy as np arr = np.[1]([2, 4, 6, 8]) std_dev = arr.[2]() print(std_dev)
Use np.array() to create the array and std() to find standard deviation.
Fill all three blanks to create a NumPy array, filter values greater than 3, and calculate their sum.
import numpy as np arr = np.[1]([1, 2, 3, 4, 5]) filtered = arr[arr [2] 3] result = filtered.[3]() print(result)
Create the array with np.array(), filter with >, and sum with sum().
