Practical No:13
1. Write a Python program to create two matrices and perform
addition,
subtraction, and multiplication and division operation on matrix.
Code:
import numpy
x=[Link]([[1,2],[4,5]])
y=[Link]([[7,8],[9,10]])
print("Addition of 2 matrix",[Link](x,y))
print("Substration of 2 matrix",[Link](x,y)) print("multiply
of 2
matrix",[Link](x,y)) print("Divictiom of 2
matrix",[Link](x,y))
Output:
2. Write a Python program to concatenate two strings.
str1="Hello"
str2="Good Morning"
str3=str1+ str2
print(str3)
Output:
13.3. Write a NumPy program to generate six random integers
between 10
and 30.
import numpy as np
x=[Link](low=10,high=30,size=6)
print(x)
Output: