25EN1107 Dayananda Sagar University • Computer Science & Engineering (Semester 1)

Object Oriented Programming (Python)

💡 DSU Exam Strategy & Guidance

Covers OOP Pillars (Encapsulation, Inheritance, Polymorphism, Data Abstraction), Function Argument Types (Positional, Keyword, Default, *args), Loop Tracing (for, while, continue, break), Recursion Call Stack Tracing, and File I/O with Exception Handling.

High-Yield Passing Strategy: Practice writing standard Python programs: Student marks calculation (total, average, grade), Recursive Fibonacci/Factorial call trees, and custom Class inheritance structures.
Most Repeated Question Topics:
Key OOP Concepts (Classes, Objects, Inheritance, Polymorphism)Python Function Argument Types (Positional, Keyword, Default)Loop Output Prediction (range, continue, while break)Recursion Tracing & Call Stack OutputDictionary & List ComprehensionsFile I/O and Exception Handling Blocks (try-except-finally)

🔥 Most Predictable Exam Questions (4)

95% Probability 8 Marks Module 4: Object-Oriented Principles

Q1. Explain the 4 fundamental pillars of OOP (Encapsulation, Abstraction, Inheritance, and Polymorphism) with illustrative Python code snippets for each.

Key Points: Define each pillar clearly. Show class with private variables (__variable) for encapsulation, abstract class with abc.ABC for abstraction, Base/Derived classes for inheritance, and method overriding/duck typing for polymorphism.

90% Probability 8 Marks Module 2: Functions & Scopes

Q2. Differentiate between Positional Arguments, Keyword Arguments, Default Arguments, and Variable-length Arguments (*args, **kwargs) in Python functions with working examples.

Key Points: Demonstrate def func(a, b=10, *args, **kwargs) and explain order of parameters, tuple packing for *args, and dictionary unpacking for **kwargs.

90% Probability 8 Marks Module 5: File I/O & Exceptions

Q3. Write a Python program to read student exam records (Name, USN, Marks in 3 subjects) from a text file, compute total and percentage, and write results to a new file while handling FileNotFoundError and ValueError.

Key Points: Use with open(...) as file:, try-except-finally blocks, string.split(",") parsing, calculation, and formatted output writing.

85% Probability 6 Marks Module 3: Recursion & Algorithms

Q4. Draw the recursion call stack tree for recursive Fibonacci fib(5) and predict the total number of function calls.

Key Points: Show binary recursion tree with fib(5) calling fib(4) and fib(3), continuing down to base cases fib(1)=1, fib(0)=0. Total function calls = 15.

🎓 Open Source Courses & Video Playlists (4)

Harvard University

Harvard CS50P: Introduction to Programming with Python

Watch Course ↗
MIT OpenCourseWare

MIT 6.0001: Intro to CS and Programming in Python

Watch Course ↗
YouTube (Corey Schafer)

Corey Schafer: Python OOP Tutorials

Watch Course ↗
IIT Madras / NPTEL

NPTEL: The Joy of Computing using Python

Watch Course ↗

📄 Previous Year Question Papers (2)

END_SEM • 2026

End Semester Exam Dec 2025 / Jan 2026 (Max Marks: 80)

View PDF ↗
END_SEM • 2024

End Semester Exam 2024

View PDF ↗

Turn 25EN1107 Notes into AI Flashcards

Upload your Object Oriented Programming (Python) lecture slides to generate spaced repetition study cards in seconds.

Start Free →