0
Module 2 Quiz
Fill in the blanks to get only the values from 'x' that are larger than 42. res=?[x>42] i tried 'filter' but the space is for a word of 2 letters??
19 Answers
+ 1
i just discovered i'm so dumb hhhh it's simply 'x'
res=x[x>42]
+ 1
sure ^^
I'm remember now... but you make me searching in other direction as you've said there was place for two letters ;P
+ 1
Fill in the blanks to select the elements of 'x' that are larger than the mean.
x[x>np.mean(x)]
please rate up
0
what is the name of the dataset?
if this is ds, then it should be ds...
0
it is just an array
0
try ds... it may be implicit ;)
0
it didn't work i think it's 'filter' but they made a mistake and didn't give it enough space
0
no there's no such issues in course quizzes...
they should have provided an hint, at least in the related lesson ;)
review it, and use the variable name they use for dataset in the examples...
0
i did search for it in the course but i didn't find it i will search again
0
read carrefully the question also: they may mention the dataset name here ^^
0
yes you're right i reasoned on how many spaces they gave
0
yes, but they don't use monospaced font...
0
yeah but sometimes you found the size space they gave you==the size of object
0
Fill in the blanks to select the elements of 'x' that are larger than the mean.
[x np. (x)]
0
res = x[x> 42 ]
0
ans is x
0
7
0
plz answe sir
- 1
import numpy as np
x = np.arange(1, 5)
print(x)
x = x*2
print(x)
print(x[:3].sum())