[go: up one dir, main page]

0% found this document useful (0 votes)
22 views8 pages

List of Programs for Python Practical Exam.docx

The document contains a list of 70 Python programming tasks that cover a wide range of topics including basic syntax, control structures, data structures, functions, classes, and exception handling. Each task requires the implementation of specific functionalities such as displaying messages, checking leap years, manipulating lists and sets, performing mathematical calculations, and creating user-defined modules. The tasks are designed to help learners practice and enhance their Python programming skills.
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)
22 views8 pages

List of Programs for Python Practical Exam.docx

The document contains a list of 70 Python programming tasks that cover a wide range of topics including basic syntax, control structures, data structures, functions, classes, and exception handling. Each task requires the implementation of specific functionalities such as displaying messages, checking leap years, manipulating lists and sets, performing mathematical calculations, and creating user-defined modules. The tasks are designed to help learners practice and enhance their Python programming skills.
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
You are on page 1/ 8

1.​ Write a Python Program to display “MSBTE” using interactive mode.

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.

5.​ Write a Python Program to display intersection of two sets.

6.​ Write a Python Program to sort dictionary in ascending order (by value)

7.​ Write a Python function to calculate square of a number.

8.​ Write a Python Program to display “MSBTE” using script mode.

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

11.​Write a Python Program to show how to concatenate two lists

12.​Write a python program to copy specific elements from existing Tuple to new Tuple.

13.​Write a Python Program to display set difference of two sets.

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.

16.​Write a Python Program to display symmetric difference of two sets.

17.​Write a Python Program to display prime numbers between 2 to 100 using nested loops

18.​ Write a Python program to sum all the items in a list.


19.​ Write a Python program to multiply all the items in a list.

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.

22.​ Write a Python program to reverse a list.

23.​ Write a Python program to find common items from two lists.

24.​ Write a Python program to select the even items of a list.


25.​Write a Python Program to print
*
**
***
****

26.​Write a Python program to multiples all the items in a list.

27.​Write a Python program to print


1010101
10101
101
1
28.​Write a Python program to combine two dictionary subtracting values for common keys.

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.

31.​Write a Python program to print Fibonacci series.

32.​Write a Python program to calculate factorial of a number

33.​Write a Python Program to Reverse a Given Number

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.

36.​Write a program to calculate surface volume and area of a cylinder.

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.

43.​Write a Python program to find the length of a set.

44.​Write a program to check if the input year is a leap year of not.

45.​Write a program to convert bits to Megabytes, Gigabytes and Terabytes

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
*
***
*****
***
*

50.​Write a Python program to perform following operations on set: intersection of sets,


union of sets, set difference, symmetric difference, clear a set.

51.​Write a Python function that takes a number as a parameter and check the number is
prime or not.

52.​Write a Python function to calculate the factorial of a number (a non-negative integer).


The function accepts the number as an argument.

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.

55.​Write a Python program to concatenate two strings.

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.

59.​Write a program to find the square root of a number.

60.​Write a program to check the largest number among the three numbers

61.​Write a Python program to Check for ZeroDivisionError Exception.

62.​Write a Python program to print all unique values in a dictionary.


Sample Data: [{"V":"S001"}, {"V": "S002"}, {"VI": "S001"}, {"VI": "S005"},
{"VII":"S005"}, {"V":"S009"}, {"VIII":"S007"}]

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.

70.​Write a program to check whether a number is even or odd

You might also like