KEMBAR78
Module 5 - List of Previous Year Questions | PDF
0% found this document useful (0 votes)
38 views1 page

Module 5 - List of Previous Year Questions

Module 5 focuses on likely questions from Chapters 15, 16, and 17 of 'Think Python: Classes and Objects.' It includes theory questions on class definition, pure functions, operator overloading, and polymorphism, as well as programming tasks to create classes for Student, Time, Complex numbers, and Rectangle. The module emphasizes understanding and implementing key object-oriented programming concepts in Python.

Uploaded by

pavithra
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)
38 views1 page

Module 5 - List of Previous Year Questions

Module 5 focuses on likely questions from Chapters 15, 16, and 17 of 'Think Python: Classes and Objects.' It includes theory questions on class definition, pure functions, operator overloading, and polymorphism, as well as programming tasks to create classes for Student, Time, Complex numbers, and Rectangle. The module emphasizes understanding and implementing key object-oriented programming concepts in Python.

Uploaded by

pavithra
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/ 1

✅ Module 5: Previous Year (Likely) Questions

(Based on Chapters 15, 16, 17 of Think Python: Classes and Objects)

🔹 Theory Questions (5–10 Marks)

1. Define a class in Python. Explain how attributes are assigned and accessed with an
example.

2. What are pure functions and modifiers? Explain with an example using a Time class.

3. Write a class to represent Time in hours, minutes, and seconds. Add methods to print and
increment time.

4. Explain the __init__() and __str__() methods with suitable examples.

5. What is operator overloading? Illustrate using __add__() method with a class.

6. Explain the concept of polymorphism with example.

7. Write a Python program to define a Rectangle class with methods to compute area and
perimeter.

8. What is type-based dispatch? How is it used in Python?

9. Discuss the difference between interface and implementation in object-oriented


programming.

10. Explain how objects are mutable and how object copying can be done.

🔹 Programming Questions (Lab-style / 10 Marks)

1. Define a class Student with attributes: name, USN, and marks in 3 subjects. Include
methods to calculate total and percentage.

2. Write a Python class Time to represent time and include a method to add two Time
objects.

3. Implement operator overloading for addition and equality (+, ==) in a custom class.

4. Create a class Complex to represent complex numbers. Add methods for addition and
display.

5. Define a Rectangle class with width and height. Write methods to calculate area and
display rectangle info.

You might also like