Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to import the popular library for numerical computing in Python.
ML Python
import [1] as np
Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to load a dataset from scikit-learn.
ML Python
from sklearn.datasets import [1] data = [1]()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the code to create a simple linear regression model.
ML Python
from sklearn.linear_model import [1] model = [1]()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to create a dictionary comprehension that maps words to their lengths if length is greater than 3.
ML Python
{word: [1] for word in words if [2] Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to create a filtered dictionary with uppercase keys and values greater than zero.
ML Python
result = { [1]: [2] for k, v in data.items() if v [3] 0 } Drag options to blanks, or click blank then click option'
Attempts:
3 left