+ 3
I'm trying to print the multiples of 3 and 5 below 100 using the below python code. But test case are not passed.
import numpy as np x = np.arrange(1,100) print(x[(x%3==0) & (x%5==0)])
5 Answers
+ 3
Sry.. You have incorrect method name in arange, have extra r.
import numpy as np
x = np.arange(1,100)
print(x[(x%3==0) & (x%5==0)])
+ 2
JayakrishnađŽđł
That's right here
Vishaka Saxena
There is only single 'r' in arrange
+ 2
Thank you A͢J JayakrishnađŽđł . Now it's workingđ
+ 1
JayakrishnađŽđł not working. Btw & is used for and operation in numpy
0
Not tested but & is 'bitwise and' operator.
In python, use and operator for logical and operation.
edit:
ok. fine with numpy.. not seen it clearly