Data Structures using Python Lab Question Paper
1. a) Write a Python program for class, Flower, that has three instance variables of type str,
int, and float that respectively represent the name of the flower, its number of petals,
and its price. Your class must include a constructor method that initializes each variable
to an appropriate value, and your class should include methods for setting the value of
each type, and retrieving the value of each type.
b) Write a program for Linear Search.
2. a) Write a python program to implement Method Overloading and Method Overriding.
b) Write a program for Binary search.
3. a) Write a Python program to illustrate the following:
i) List ii) Dictionary
b) Write a Python program to generate the combinations of n distinct objects taken
from the elements of a given list.
4. a) Write a Python program to illustrate the following:
i) Set ii) Generator
b) Write a Python program to generate the combinations of n distinct objects taken
from the elements of a given list.
5. Write a program to implement a) Bubble Sort
b) Quick Sort.
6. Write a program to implement a) Merge Sort
b) Selection Sort.
7. Write a program to implement a) Bubble Sort
Merge Sort.
8. Write a program to implement a) Quick Sort.
b) Selection Sort.
9. Write a program to implement Stacks.
10. Write a program to implement Queues.
11. Write a program to implement Singly Linked List.
12. Write a Python program to implement Doubly Linked List.