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??

22nd Mar 2021, 8:40 PM
Abdelaziz Chadli
19 Réponses
+ 1
i just discovered i'm so dumb hhhh it's simply 'x' res=x[x>42]
22nd Mar 2021, 9:16 PM
Abdelaziz Chadli
+ 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
22nd Mar 2021, 9:18 PM
visph
visph - avatar
+ 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
17th Aug 2022, 11:06 AM
Mlondolozi Nani
Mlondolozi Nani - avatar
0
what is the name of the dataset? if this is ds, then it should be ds...
22nd Mar 2021, 8:44 PM
visph
visph - avatar
0
it is just an array
22nd Mar 2021, 8:47 PM
Abdelaziz Chadli
0
try ds... it may be implicit ;)
22nd Mar 2021, 8:48 PM
visph
visph - avatar
0
it didn't work i think it's 'filter' but they made a mistake and didn't give it enough space
22nd Mar 2021, 8:51 PM
Abdelaziz Chadli
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...
22nd Mar 2021, 8:53 PM
visph
visph - avatar
0
i did search for it in the course but i didn't find it i will search again
22nd Mar 2021, 8:57 PM
Abdelaziz Chadli
0
read carrefully the question also: they may mention the dataset name here ^^
22nd Mar 2021, 8:58 PM
visph
visph - avatar
0
yes you're right i reasoned on how many spaces they gave
22nd Mar 2021, 9:21 PM
Abdelaziz Chadli
0
yes, but they don't use monospaced font...
22nd Mar 2021, 9:22 PM
visph
visph - avatar
0
yeah but sometimes you found the size space they gave you==the size of object
22nd Mar 2021, 9:27 PM
Abdelaziz Chadli
0
Fill in the blanks to select the elements of 'x' that are larger than the mean. [x np. (x)]
13th Jul 2021, 12:53 AM
Marichu Camargo
Marichu Camargo - avatar
0
res = x[x> 42 ]
10th Nov 2021, 10:17 AM
Fayziev Damirjon Furkatovich
Fayziev Damirjon Furkatovich - avatar
0
ans is x
6th Dec 2021, 7:05 AM
Spandana K R
0
7
6th Nov 2022, 10:22 PM
Anass Fangour
0
plz answe sir
18th Dec 2022, 6:10 AM
DESAM YASHODA
DESAM YASHODA - avatar
- 1
import numpy as np x = np.arange(1, 5) print(x) x = x*2 print(x) print(x[:3].sum())
31st Aug 2022, 10:10 AM
DANCAN KENNEDY