Question Bank-DSA Using Python (Unit-I & Unit-II)
Question Bank-DSA Using Python (Unit-I & Unit-II)
Hyderabad Campus
Question bank for
19EEC340: Data Structures and Algorithms with Python
(AI & ML)
SEM/YEAR/DEPT : VI/ III /EECE PREPARED BY : Dr. Mahammad Rafi D /HYD/CSE
UNIT-I
Object-oriented concepts in Python: Creating a class, objects, methods,
constructor, encapsulation, inheritance, polymorphism, operator overloading.
2 Marks Questions
1.What is Object Oriented Programming? 2 Marks
2. What is the difference between a class and a structure? 2 Marks
3. What is abstract Class? 2 Marks
4. What are the basic concepts of OOP? 2 Marks
5. What is the difference between local variable and data member? 2 Marks
6. Is it possible to call the base class method without creating an instance? 2 Marks
7. What are the access modifiers? 2 Marks
8. What languages come under the oops concept? 2 Marks
9. What are the limitations of inheritance? 2
Marks
10. What is the difference between public, private and protected access modifiers? 2
Marks
11. Differentiate between data abstraction and encapsulation with Example ? 2
Marks
12. Who is the father of OOPS? What are the advantages of OOPS? 2 Marks
5 Marks Questions
1. What is the function parameter? Difference between parameter and
Argument? 5 Marks
2. What are the advantages and limitations of OOPs? explain? 5
Marks
3. What are constructors? write the Types of constructor? 5
Marks
10 Marks Questions
1. Define the following terms 10 Marks
i. abstraction ii. Encapsulation
iii. Polymorphism iv. method overloading and method overriding
2. What are the main features of OOPs? Explain with Example ? 10
Marks
3. Define the following terms with example 10 Marks
i. inheritance ii. hybrid inheritance
iii. hierarchical inheritance iv. multi level inheritance
v. multiple inheritance
UNIT -1 Programs
1. Write a program to create Student class with data members student rollno,
name, address, course. Include a constructor to initialize data members. Add a
method to print the student details
2. Develop a program to Perform Python Multi-Level and multiple inheritances.
3. Design a program to overload “+” operator for
• Concatenating two strings
• Adding two complex numbers
UNIT-II
Searching: Sequential Search, binary search. Sorting: Insertion sort, selection sort,
bubble sort. Linked lists: Single linked list, double linked list, circular linked list.
5 Marks Questions :
Linked lists :
2 Marks Questions :
5 Marks Questions :
1) What are the main differences between the Linked List and Linear Array? 5 Marks
2) How can someone insert a node in a random location of the Linked List? 5 Marks
3) State the different Types of Linked Lists along with example? 10 Marks
UNIT-II Programs
1. Develop a program to overload “area” method to calculate area of different
polygon shapes. Write a program to
• Implement Method Overriding
• Perform Linear Search on an array.
• Perform Binary Search on a list stored in an array
2. Develop a program to implement various sorting techniques
• Insertion sort
• Selection Sort
• Bubble Sort.