Python Programming Practical Program list
1) Write a program to print all prime numbers between 1 to 100.
2) Create a dictionary containing any 5 elements in the form of key, value pair, and write python
code to perform the following operations on it.
i) To display all the keys.
ii) To add new value pair.
iii) To delete specific element from the dictionary.
iv) To modify value of a particular key.
3) Write a python program to add two matrices using list. Accept elements for the matrices
from the user.
4) Write a function to accept string from user and it will return reverse each word of string.
5) write a user defined exception program in python which will find the factorial of a number.
If number is less than zero it should raise the exception as ‘Invalid Input’.
6) Write a program to demonstrate the use of any five function from the random module.
7) Create a class student having attribute ‘First Nam’, ‘Last Name’, ‘Qualification’, and method
‘Update qualification’, ‘Display details’, and a constructor to initialize the values. Write main
program to demonstrate the use of student class.
8) Write a python program to validate strong password.
9) Write a program to validate email address using regular expression.
10) Write a multithreaded program where one thread prints square of number and another
thread prints cube of numbers. Make use of thread synchronization.
11) Write a program to demonstrate use of packages in python.
12) Write a MongoDB program to perform CRUD operation.
13) Write a python program using MongoDB to create a ‘Library’ collection having fields,
BookTitle, BookAuthor, BookPages, BookPrice, Accept the input from user to insert
documents.
14) Write a MongoDB program to create “Student_info” collection having fields:
Roll No, Name, Course, total marks, percentage. Write a code to perform following operations:
i) Insert 5 documents.
ii) Find student getting percentage between 70 to 80.
iii) Update Roll no for student named as “Rahul”.
iv) Display top 5 students according to percentage.
v) Find all students of course MCA
vi) Sort all students in descending order of their percentage.