List of Programs for Python Practical Exam.docx
List of Programs for Python Practical Exam.docx
2. Write a Python Program to check if the input year is leap year or not.
3. Change the following code from while loop to for loop
X=100
while x>5:
print x
X-=1
4. Write a Python Program to show how to find common items from two lists.
6. Write a Python Program to sort dictionary in ascending order (by value)
9. Write a Python Program to display the absolute value of an input number.
10.Change the following code from while loop to for loop
X=1
While x<20:
print x
X+=1
12.Write a python program to copy specific elements from existing Tuple to new Tuple.
14.Write a Python Program to display the concatenated dictionary from two dictionaries.
15.Write a Python function to display whether the number is positive negative or zero.
17.Write a Python Program to display prime numbers between 2 to 100 using nested loops
20. Write a Python program to get the largest number from a list.
21. Write a Python program to get the smallest number from a list.
23. Write a Python program to find common items from two lists.
29.Write a Python program to print all even numbers between 1 to 100 using while loop.
30.Write a Python program to find the sum of first 10 natural numbers using for loop.
34.Write a Python program takes in a number and finds the sum of digits in a number.
35.Write a Python program that takes a number and checks whether it is a palindrome or not.
37.Write a program to check the largest number among the three numbers
38.Write a Python program to create a user defined module that will ask your first name and
last name and will display the name after concatenation.
39.Write a program that takes the name of student and marks of 5 subjects and displays the
grade in tabular form.
40.Write a Python program to create a set, add member(s) in a set and remove one item from
set.
41. Write a Python program to perform following operations on set: intersection of sets,
union of sets, set difference, symmetric difference, clear a set.
42.Write a Python program to find maximum and the minimum value in a set.
46.Write a program that takes the marks of 5 subjects and displays the grade.
47.Write a Python program to create a user defined module that will ask your company name
and address and will display them.
48.Write a Python function that accepts a string and calculate the number of upper case
letters and lower case letters.
49.Write a Python Program to print the following
*
***
*****
***
*
51.Write a Python function that takes a number as a parameter and check the number is
prime or not.
53. Write a Python function that takes a number as a parameter and check the number is
prime or not.
54.Write a Python program that will calculate area and circumference of circle using inbuilt
Math Module.
56.Write a Python program to create two matrices and perform addition, subtraction, and
multiplication and division operation on matrix.
57.Write a Python program to create a class to print the area of a square and a rectangle. The
class has two methods with the same name but different number of parameters. The
method for printing area of rectangle has two parameters which are length and breadth
respectively while the other method for printing area of square has one parameter which
is side of square.
58.Python program to read and print student’s information using two classes using simple
inheritance.
60.Write a program to check the largest number among the three numbers
63.Print the number in words for Example: 1234 => One Two Three Four
64.Write a NumPy program to generate six random integers between 10 and 30.
65.Write a Python program to create user defined exception that will check whether the
password is correct or not.
66.Create a class Employee with data members: name, department and salary. Create
suitable methods for reading and printing employee information
67. Python program to read and print student information using two classes using simple
inheritance.
68.Write a Python program to implement multiple inheritance.
69.Write a Python program to create a class to print the area of a square and a rectangle. The
class has two methods with the same name but different number of parameters. The
method for printing area of rectangle has two parameters which are length and breadth
respectively while the other method for printing area of square has one parameter which
is side of square.