0% found this document useful (0 votes)
6 views13 pages

Python Lab Programs

The document outlines a series of programming tasks involving data manipulation and analysis using Python. It includes operations on number and string lists, matrix operations with NumPy, tuple processing, statistical calculations, and data visualization with Matplotlib. Additionally, it mentions creating an Excel table with student data and a database using MongoDB.

Uploaded by

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

Python Lab Programs

The document outlines a series of programming tasks involving data manipulation and analysis using Python. It includes operations on number and string lists, matrix operations with NumPy, tuple processing, statistical calculations, and data visualization with Matplotlib. Additionally, it mentions creating an Excel table with student data and a database using MongoDB.

Uploaded by

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

1.

Perform the following operations on number list:


a) Sum
b) Average
c) Max
d) Min
e) Sort
f) Reverse

Output:
2. Perform the following operations on string list:
a) Swap elements of string list
b) Combining two list

Output:
3. Perform matrix operations using NumPy

Output:
4. Write a python program to find tuples which have all elements divisible by k
from a list of tuples

Output:
5. Write a python program for removing duplicates from tuples

Output:
6. Perform the following operations using NumPy:
a) Joining two arrays
b) Splitting arrays
c) Searching element
d) Sorting
e) Filtering

Output:
7. Create excel table of students using pandas having
1) USN
2) Name
3) M1
4) M2
5) M3
Calculate total and average and display result in table format

[Link]
8. Write program for following:
a) Normal distribution
b) Binomial distribution
c) Poisson distribution
d) Uniform distribution
e)
f) Logistic distribution
9. Calculate the following
a) Mean
b) Median
c) Mode
d) Standard Deviation
e) Percentile
import numpy as np
from scipy import stats
data = [1,2,3,4,5,6,7,8,9,10,11,12]
mean = [Link](data)
median = [Link](data)
mode = [Link](data)
std_dev = [Link](data)
percentile_50 = [Link](data, 50)
print("Mean:", mean)
print("Median:", median)
print("Mode:", mode)
print("Standard Deviation:", std_dev)
print("50th Percentile (Median):", percentile_50)
10. Calculate
a) Linear Regression
b) Polynomial Regression
a) Linear Regression
b) Polynomial Regression
11. Draw following diagram using Matplotlib
a) Line
b) Grid
c) Bars
d) Pie Chart
12. Create a database using MongoDB.
Insert the records and display the records.

You might also like