0% found this document useful (0 votes)
14 views2 pages

Python PR

The document outlines three Python programs using NumPy: the first performs matrix operations (addition, subtraction, multiplication, and division), the second concatenates two strings, and the third generates six random integers between 10 and 30. Each program includes the aim, code, and expected output. The document also includes enrollment and class information for a student named Atharva Wagh.

Uploaded by

atharvwagh81
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Python PR

The document outlines three Python programs using NumPy: the first performs matrix operations (addition, subtraction, multiplication, and division), the second concatenates two strings, and the third generates six random integers between 10 and 30. Each program includes the aim, code, and expected output. The document also includes enrollment and class information for a student named Atharva Wagh.

Uploaded by

atharvwagh81
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Name: Atharva wagh Enrollment:23111590391 Class: CO4K

Batch: A3 Subject: PWP Practical: 19

Program 1:
Aim: Write a Python program to create two matrices and perform addition, subtraction,
multiplication and division operation on matrix using NumPy.?
Code:
import numpy as n
mat1 = [Link]([[1,2],[3,7]])
mat2 = [Link]([[8,3],[4,3]])
print(mat1)
print(mat2)
addition=mat1+mat2
substraction=mat2-mat1
division=mat1/mat2
multiplication=mat1*mat2
print(addition)
print(substraction)
print(division)
print(multiplication)
Output:

Program 2:
Aim: Write a python program to concatenate two strings using NumPy.
Code:
import numpy as n
s1=input("enter your first ")
s2=input("enter youur second ")
print("name",[Link](s1,s2))

Output:
Program 3:
Aim: Write a NumPy program to generate six random integers between 10 and 30.
Code:
import numpy as n
print([Link](10,30,6))
Output:

(Process Related) (Product Related) (Total)


30 20 50 Teacher’s Signature

You might also like