Python pr.no.13
Python pr.no.13
Code:
import numpy
x=numpy.array([[1,2],[4,5]])
y=numpy.array([[7,8],[9,10]])
print("Addition of 2 matrix",numpy.add(x,y))
print("Substration of 2 matrix",numpy.subtract(x,y)) print("multiply
of 2
matrix",numpy.multiply(x,y)) print("Divictiom of 2
matrix",numpy.divide(x,y))
Output:
Output:
13.3. Write a NumPy program to generate six random integers
between 10
and 30.
import numpy as np
x=np.random.randint(low=10,high=30,size=6)
print(x)
Output: