0% found this document useful (0 votes)
2 views4 pages

Python Practical Questions

The document is a list of programming tasks that cover various concepts in Python, including basic operations, data structures, object-oriented programming, and error handling. It includes tasks such as converting currencies, calculating areas, handling lists and dictionaries, and implementing classes with methods. Additionally, it addresses file handling, GUI creation, and exception management.

Uploaded by

lagadyashraj
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)
2 views4 pages

Python Practical Questions

The document is a list of programming tasks that cover various concepts in Python, including basic operations, data structures, object-oriented programming, and error handling. It includes tasks such as converting currencies, calculating areas, handling lists and dictionaries, and implementing classes with methods. Additionally, it addresses file handling, GUI creation, and exception management.

Uploaded by

lagadyashraj
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
You are on page 1/ 4

1) Write a program to display MSBTE using Script Mode.

2) Write a program to convert U.S. dollars to Indian Rupee.

3) Write a program to convert bits to Megabytes, Gigabytes and Terabytes.

4) Write a program to find square root of a number.

5) Write a program to find area of Rectangle.

6) Write a program to calculate area and perimeter of square.

7) Write a program to calculate surface volume and area of cylinder.

8) Write a program to swap value of two variables.

9) Write a program to check whether number is even or odd.

10) Write a program to check the largest number among three numbers.

11) Write a program to check if the input year is leap or not.

12) Write a program to check whether number is positive, negative or zero.

13) Write a program that takes the marks of 5 subjects and display the grade.

14) Write a program to display following output.

* *

* * *

* * * *

15) Write a program to print all even numbers between 1 to 100 using while loop.

16) Write a program to find sum of first 10 natural numbers using for loop.

17) Write a program to print Fibonacci series.

18) Write a program to calculate factorial of a given number.

19) Write a program to reverse a given number.

20) Write a program that takes in a number and finds the sum of digits in a number.

21) Write a program that takes a number and checks whether it is a palindrome or not.
22) Write a program to sum all the items in a list.

23) Write a program to multiply all the items of a list.

24) Write a program to get largest number from a list.

25) Write a program to find smallest number from a list.

26) Write a program to reverse a list.

27) Write a program to select even items of a list.

28) Write a program to create a tuple and find minimum and maximum value of a tuple.

29) Write a program to create a set, add members in set and remove one from it.

30) Write a program to perform set operations like intersection, set difference, symmetric

difference, clear set.

31) Write a program to sort a dictionary by value.

32) Write a program to combine two dictionary adding values for common keys.

33) Write a program that accepts a string and calculate the number of upper case letters

and lower case letters.

34) Write a function that takes a number as a parameter and check number is prime or not.

35) Write a Python function to calculate factorial.

36) Write a program to create a user defined module that will ask your college name and

will display the name of the college.

37) Write a program that will calculate area and circumference of circle using inbuilt

Math module.

38) Write a program to concatenate two strings.

39) Write a program to create a class to print an integer and a character with two methods

having the same name but different sequence of integer and character parameters.
40) Write a program to create a class to print the area of square and rectangle. The class

has two methods with the same name but different number of parameters. The method

of 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.

41) Write a program to create a class ”Degree” having methods ‘getDegree’ that prints “I

got a degree”. It has two subclasses namely ‘Undergraduate’ and ‘Postgraduate’ each

having a method with same name that prints “I am an Undergraduate” and “I am a

Postgraduate” respectively. Call the method by creating an object tof each of three

classes.

42) Write a program to create a class Employee with data members: name, department,

and salary. Create suitable methods for reading and printing employee information.

43) Write a program to read and print student information using two classes using simple

Inheritance.

44) Write a program to implement multiple inheritance.

45) Write a program to check for ZeroDivisionError Exception.

46) Write a program to create user defined exception that will check whether the

password is correct or not.

47) Write a program to demonstrate use of break statement.

48) Write a program to demonstrate a use of nested if else.

49) Write a program to create two matrices and perform addition, subtraction,

multiplication and division operations on matrix using numpy.

50) Write a program to reverse a string word by word.

51) Write a python program to implement parameterized constructor.

52) Write a program to create series from array using Panda.


53) Write a python program to access element series from list using Pandas.

54) Write GUI program to import Tinkter package and create a window and set title.

55) Write a program to illustrate if else ladder.

56) Write a program to read contents of abc.txt and write same content to pqr.txt.

57) Create a class Student with data members name, roll number and address. Create a

suitable method for reading and printing student details.

58) Create a parent class named Animals and a child class Herbivorous which will extend

the Animal class Herbivorous and override the method feed().

59) Write a program to print

1 2

1 2 3

1 2 3 4

60) Write a program for importing module for addition and subtraction of two numbers.

61) Write a program to create dictionary of student that includes their ROLL NO and

NAME.

i) Add three students in above dictionary.

ii) Update the name=”Ram” of ROLL NO=2

iii) Delete information of ROLL NO=1

You might also like