Python programming
Debarred Assignment questions
Date-11/03/2026
1) Explain the concepts of identifiers, variables, constants, and reserved words in
Python. Discuss their rules, characteristics, and provide suitable examples.
2) Explain the working of conditional statements (if, elif, else) in Python.
Illustrate the flow of control with syntax and examples.
3) Compare Python 2 and Python 3 in detail with examples and justify why Python 3 is
preferred.
4) Explain in detail how Python executes a program, including the role of bytecode and
the Python Virtual Machine (PVM).
5) Explain input and output operations in Python.
Date- 18/03/2026
1) D Write two Python programs to find the factorial of a number:
(a) Using recursion
(b) Using iteration
Compare both approaches based on execution and memory usage. iscuss type
conversion (type casting) with suitable examples.
2) Write a Python program to check whether a given number is positive, negative, or
zero using conditional statements.
3) Write a Python program to demonstrate dynamic typing by assigning different types
of values to the same variable.
4) Write a Python program to illustrate a pure function that returns the sum of two
numbers.
5) Write a Python program to print numbers from 1 to 20 using a for loop.
Date- 25/03/2026
1) Write a python program that prompts user to enter a month number (1-12) and then
print the corresponding month name .
2) Compare the result of Newton’s Method with Python’s built-in [Link]() function.
3) Write a program to handle invalid input (negative numbers, zero division case).
4) Program to Find GCD of Two Numbers (Using Euclidean Algorithm)
5) WAP to perform union, intersection and difference on the three sets of triangle edge.
Date- 01/04/2026
1) Explain OOP concepts in Python with example (Encapsulation, Inheritance,
Polymorphism).
2) Compare Python with other programming languages (C/Java).
3) Explain different types of functions in Python with examples.
4) Discuss error handling in Python with try-except-finally.
5) Explain file handling operations in Python.
Date- 15/04/2026
1. Explain the use of Python in real-life applications. Develop a Python program for a
simple banking system using functions and conditional statements.
2. Develop a Python program to generate a triangle pattern using a for loop and then
reproduce the same pattern using a while loop within a single execution. Ensure both
patterns are identical and properly formatted.
3. Explain string slicing and indexing. Develop a Python program to reverse a string and
check palindrome condition without using built-in reverse functions.
4. Explain list comprehension in Python with syntax. Develop a Python program to
create a list of squares of numbers from 1 to 20 using list comprehension.
5. Explain instance, static, and local variables in Python. Develop a Python program to
demonstrate all three types of variables.
Date- 22/04/2026
1. Explain the concept of list comprehension in Python. Discuss its syntax,
advantages, and how it improves code readability and performance.
2. Explain the role of slicing in data manipulation in Python. And how can slicing be
used to extract, reverse, and modify sequences.
3. Difference between generator functions and normal functions in Python with
example.
4. Describe the difference between shallow copy and deep copy in Python. Explain their
effects on nested lists with suitable examples.
5. Explain the concept of negative indexing and step value in slicing. Provide examples
showing different slicing operations.
Date- 29/04/2026
1. Demonstrate the implementation of multitasking in Python using multiple threads in a
program.
2. Illustrate the working of thread-based multitasking for performing multiple tasks
concurrently in a Python program.
3. Demonstrate the creation of a thread without extending the Thread class using target
function.
4. Analyze the differences between thread creation using function and thread creation
using class.
5. Demonstrate the use of enumerate() function to list all active threads in Python.
Date- 06/05/2026
1) Demonstrate the process of creating, writing, and reading a file in Python using file
handling operations.
2) Develop a Python program to read data from one file and write it into another file.
3) Analyze the performance impact of multithreading in CPU-bound and I/O-bound tasks
in Python programs.
4) Demonstrate the creation and execution of multiple threads performing independent
tasks.
5) Demonstrate the use of start() method for initiating thread execution in Python.
Date- 13/05/2026
1. Demonstrate the creation and execution of multiple threads performing independent
tasks. (BL-3)
2. Demonstrate the use of start() method for initiating thread execution in Python. (BL-3)
3. Analyze the difference between read(), readline(), and readlines() methods in file
processing. (BL-4)