Assignment Questions
Subject –Python Course: 5BCA
Unit - 3
Q.1. What is modular programming, and why is it important in software development? Discuss the
advantages of dividing a project into modules.
Q.2. Explain the difference between pre-defined and user-defined modules in Python. Provide an
example of creating and using a user-defined module.
Q.3. What is the difference between a package and a folder in Python? How are Python projects
organized using packages? Write a simple example illustrating the creation of a package
with multiple modules.
Unit - 4
Q.1. Procedural vs Object-Oriented Programming: Compare and contrast procedural programming
with object-oriented programming. Provide examples of both approaches in Python.
Q.2. OOP Principles: Explain the principles of object-oriented programming: encapsulatio n,
abstraction, polymorphism, and inheritance. Provide Python examples demonstrating each
principle.
Q.3. Exception Handling: Discuss the different types of errors in Python. How do the try, except,
finally, and raise statements work? Provide an example of custom exception handling.
Unit - 5
Q.1. What is the difference between multithreading and multiprocessing in Python? Provide an
example of a multithreaded program using the threading module.
Q.2. Describe the life cycle of a thread in Python. Explain the purpose of the run(), start(), sleep(), and
join() methods with examples.
Q.3. What is thread synchronization, and why is it necessary? Explain how the Lock class and its
acquire() and release() methods are used to ensure proper synchronization in a multithreaded
application.
Note : Assignment submission date is 22-10-24