Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 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 Respostas
+ 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