Unit 1
Here is a complete list of Unit 1 questions from the Python subject (PLC2 – Introduction to
Python Programming) compiled from all available exams, along with the repeated
questions.
✅ All Unit 1 Questions (from 6 different exams)
🔹 Common Topics Covered
Data types (int, float, str, etc.)
Type conversion (str(), int(), float())
Control structures (if, elif, else, loops, break, continue)
User-defined functions (def)
Programs on factorial, prime numbers, senior citizen check, temperature conversion,
permutations
📘 Unit 1 Questions - Exam-wise Summary
📄 Aug–Sept 2024 (Supplementary)
Differentiate between standard data types with example.
Precedence of mathematical operators with example.
Program using for and while loops to print 1 to 10.
Explain import statement with syntax.
OR
Types of flow control statements with example.
Program using if...elif...else with variable spam.
Program with name & password using break/continue.
📄 Sept 2024
Structure of user-defined function with add() example.
Program to print all prime numbers within a range.
OR
Explain two flow control statements with examples.
Define fact() and write program to compute factorial.
📄 Sept 2023
Standard data types with examples.
String concatenation and replication with example.
Programs:
1. Convert Fahrenheit to Celsius
2. Factorial of a number
OR
Break vs continue.
if/else with flowchart.
Nested loops: program to find all permutations of 3-letter word.
📄 April–May 2023
Use of str(), int(), and float() functions with examples.
Program to check senior citizen using if, elif.
Local vs global variables with examples.
OR
Difference between break and continue.
for loop with range() example.
Exception handling: zero division error.
📄 July–Aug 2024
Math operators from highest to lowest precedence with example.
Type conversion using str(), int(), float() with example.
Program to read name and year of birth, check for senior citizen.
OR
Comparison operators & Boolean combinations.
Flow diagrams for if, elif.
Factorial program using function.
📄 Another Supplementary Paper
Same as above (some repeats from Aug–Sept 2024).
🔁 Repeated Unit 1 Questions
Question No. of Occurrences
Difference between break and continue statements 3 times
Factorial program (using function) 4 times
Standard data types with examples 2–3 times
Flow control (if, elif, else, loops) with diagram or examples 4+ times
Type conversion using str(), int(), float() 2 times
Check for senior citizen using age or DOB 2–3 times
Prime number within range 1–2 times
Nested loop with permutations 1 time
Precedence of operators 2 times
String concatenation/replication 2 times
Unit 2
Here is a comprehensive list of all Unit 2 questions (Data Structures) from multiple exams of
Introduction to Python Programming (PLC2), along with the repeated questions.
✅ All Questions from Unit 2 (Data Structures)
📘 Exam: Aug–Sept 2024
a) What are lists? Explain operations like append, insert, extend, sort, reverse, del,
shuffle.
b) Illustrate list concatenation and replication with example.
c) Differentiate between lists and tuples. Discuss unsupported functions in tuples.
OR
a) Difference between dictionary and list. Explain 'cat' in spam vs 'cat' in [Link]().
b) Program to update a friend database using dictionary.
c) Program to count occurrences of each letter in a string.
📘 Exam: Sept 2024
a) Explain methods to insert/delete elements from a list.
b) Program using dictionary to count character occurrence.
c) Program to find average value of elements in a list.
OR
a) Dictionary data structure in Python. Methods to insert and update.
b) Program to read N numbers and display max, min, sum.
📘 Exam: Sept 2023
a) Difference between lists and tuples with examples.
b) Assigning/copying data in lists.
c) Difference between dictionary and list. Explain 'cat' in spam vs 'cat' in [Link]().
OR
a) Discuss built-in functions of dictionary.
b) Explain augmented assignment operators.
c) Output analysis of dictionary operations in a given program.
📘 Exam: Apr–May 2023
a) Explain any 4 methods of list data type.
b) Program to create a birthday dictionary and check key.
c) What are mutable and immutable types? Give examples.
OR
a) Program to read N numbers, create list, find mean, variance, std. dev.
b) Explain tuple syntax. Convert list↔tuple with example.
c) Set default value for a dictionary key.
📘 Exam: July–Aug 2024
a) Program to count even and odd numbers in a list.
b) Logic for list concatenation and replication.
c) Explain keys(), values(), and items() with example.
OR
a) Difference between list and dictionary with examples.
b) Methods on list: index(), append(), random_shuffle().
c) Program to sort contents of text file and write to new file.
🔁 Repeated Questions from Unit 2
Repeated Question / Topic Frequency
Difference between lists and tuples 3 times
Dictionary vs List, 'key' in dict vs 'key' in [Link]() 3 times
Program to count occurrences of characters using dictionary 2 times
Program to read N numbers and display max, min, sum 2 times
List methods like append(), insert(), sort() 3+ times
Repeated Question / Topic Frequency
Explanation of dictionary structure and update methods 2 times
List concatenation and replication 2 times
Use of keys(), values(), items() 2 times
Unit 3
Here is the complete collection of Unit 3 questions from all available Python (PLC2)
question papers, along with a list of repeated questions:
✅ All Unit 3 Questions (Strings and File Handling)
📘 Exam 1: Aug–Sept 2024
Q5
a) Discuss the string built-in methods used in Python with example.
b) What do the following expressions evaluate to?
(i) 'Hello, world!'[1],
(ii) 'Hello, world!'[0:5],
(iii) 'Hello, world!'[:5],
(iv) 'Hello, world!'[3:],
(v) 'Hello'.upper().isupper,
(vi) 'Hello'.upper().lower()
c) Illustrate different string methods used to right-justify, left justify and center a
string with example.
OR
Develop a program to find the total size of all files in directory c:/windows/system32.
Differentiate between read() and readlines() methods.
Generate 5 quizzes with 5 MCQs each, including correct and 3 random wrong
answers.
📘 Exam 2: Sept 2024
Q5
a) Explain any 5 string handling methods with example.
b) Write a Python program to copy odd lines from a source file to destination file.
OR
Explain read() and readlines() methods with example.
Python program to check if a string is a palindrome.
Python program to count occurrences of character 'e' in a string.
📘 Exam 3: Sept 2023
Q5
a) Discuss any five methods available to string objects.
b) Explain splitting strings with the partition() method with an example.
c) Differentiate the steps involved in generating random quiz files.
OR
Differentiate between join() and split() methods.
Describe steps for adding bullets to Wiki markup.
Python program to copy file content, count characters and lines.
📘 Exam 4: Apr–May 2023
Q5
a) Use of string methods: join(), split(), ljust(), rjust()
b) Code to remove whitespace from left, right, both sides.
c) Program to write, append, and read file content.
OR
Explain paperclip module.
Differentiate absolute vs relative paths.
Using shelve module to save variables.
📘 Exam 5: July–Aug 2024
Q5
a) Explain string methods: upper(), lower(), isupper(), islower(), startswith(),
endswith()
b) File operations: open(), reading, writing files
OR
Solve:
o string_1 = 'Hellow' → Output of string_1[0], string_1[-1]
o string_2 = 'Hellow SIT Tumakuru' → Output of:
string_2[2:8]
string_2[0:9:2]
string_2[11:4:-2]
Explain absolute vs relative paths, [Link] methods.
Difference between read() and readlines()
🔁 Repeated Unit 3 Questions
Repeated Question Appears In
Explain any 5 string handling methods with example All 5 exams
Difference between read() and readlines() methods Exams 1, 2, 3, 5
Justify, align and center string methods (ljust(), rjust(), center()) Exams 1, 4
File read/write/append programs Exams 3, 4, 5
Program to check palindrome Exam 2
Program to count occurrence of character in string Exam 2
Program to copy odd lines from one file to another Exam 2
Repeated Question Appears In
Generate random quiz files Exams 1, 3
String slicing/indexing practice (string_2[0:9:2] etc.) Exam 5
Absolute vs relative paths Exams 4, 5
Unit 4
Here is a detailed extraction of all questions from Unit 4 and the repeated questions across
exams from the subject Introduction to Python Programming (PLC2):
✅ All Unit 4 Questions (Module: File Handling, Modules, Exceptions, Logging)
📘 Exam: Aug–Sept 2024
a) Illustrate copying, moving and renaming of files using shutil module with
examples.
b) Develop a program to compress files and read Zip files using zipfile module.
c) Differentiate between [Link]() and [Link]().
OR
a) Discuss raising exceptions and assertion statements in Python with an example.
b) Discuss the five logging levels used in Python.
📘 Exam: Supplementary Sept 2024
a) Briefly explain different file operations supported by shutil module.
b) Develop a program to back up a folder into a zip file and display subfolders/files.
OR
a) Discuss five logging levels used in Python along with disabling log messages.
b) Write a function DivExp(a, b) that asserts a>0 and raises an exception if b==0.
📘 Exam: Sept 2023
a) Illustrate different file operations supported in Python using shutil module.
b) Explain steps involved in backing up a folder into a ZIP file.
c) Discuss renaming files with example.
OR
a) Explain raising exceptions and assertions with example.
b) Discuss file access modes and write a Python program to display keywords from a
source file.
📘 Exam: April–May 2023
a) Code snippet to illustrate how [Link]() works.
b) Program to read and extract zip files.
c) What is assertion? Explain with a Python example.
OR
a) Program to safely delete a folder/file.
b) Difference between [Link]() and [Link]().
c) Program to calculate factorial of a number.
📘 Exam: July–Aug 2024
a) Illustrate with examples the purpose of shutil module (copy, move, rename,
delete).
b) What are logging levels? Explain all five with examples.
OR
a) Python program to guess a number.
b) Logic to read ZIP files in Python.
c) Creating and adding ZIP files with example.
🔁 Repeated Questions in Unit 4
Question Appeared In
shutil module operations (copy, move, rename, All 5 exams (with variations)
Question Appeared In
delete)
3+ times (July–Aug 2024, Sept 2024, Aug–
Logging levels and their uses
Sept 2024)
Working with ZIP files (creation, reading, backup) 4 exams
Raising exceptions and assertions 3+ times (all theory-heavy papers)
Difference between [Link]() and
2 times (Aug–Sept 2024, Apr–May 2023)
[Link]()
Program to guess a number (basic file
Once (July–Aug 2024)
interaction/game logic)
UNIT 5
Here is the complete list of all Unit 5 questions from the file PLC2 (1)_merged (1).pdf
(Introduction to Python Programming), including repeated questions across exams:
✅ All Unit 5 Questions
📘 Exam 1: Aug–Sept 2024
1. Define a class and object.
Develop a Python program to demonstrate the concept of class and objects.
2. Write a definition for a class Rectangle
With attributes width and height, where corner is a point object specifying the lower
left corner.
3. What is a Pure function?
Illustrate the same with an example in Python.
OR
4. Differentiate between __init__ and __str__ methods
Along with an example used in Python.
5. Define polymorphism.
Demonstrate with a function to find a histogram that counts how many times each
letter appears in a word and a sentence.
6. Discuss operator overloading
With a Python programming example.
📘 Exam 2: Sept 2024 (Supplementary)
1. Explain the concept of classes and objects
With a sample program.
2. Develop a program using class Student
That prompts the user to enter marks in three subjects and calculates total marks,
percentage, and displays scorecard. Use __init__(), get_marks(), and display()
methods.
OR
3. Differentiate between pure functions and modifiers
With an example for each.
4. Define a class for student
With attributes USN, NAME, PHONE. Develop a Python program to read and display
the details of two students.
📘 Exam 3: Sept 2023
1. Define a class and object.
Develop a Python program to demonstrate the concept of class and objects.
2. Demonstrate polymorphism
With a function to find a histogram to count how many times each letter appears in a
word and sentence.
3. Write a function draw_rect
That takes a Turtle object and a Rectangle and uses the Turtle to draw the rectangle.
OR
4. What is a pure function?
Illustrate with an example.
5. Differentiate between __init__ and __str__ methods
With an example.
📘 Exam 4: Apr–May 2023
1. When do objects become mutable?
Explain this with the help of a Rectangle class.
2. What are pure functions?
Explain in detail with a suitable program.
OR
3. Develop a program using class Student
To calculate total marks, percentage, and display the score details using __init__(),
getmarks(), and display().
4. What are modifiers?
Write a suitable code to explain this concept.
📘 Exam 5: July–Aug 2024
1. What is a class?
Show with a suitable example how class and objects are created.
2. Justify shallow copy vs deep copy
Using an object diagram.
3. What are pure functions?
Illustrate the concept with an example.
OR
4. Implication of __init__ and __str__ methods
With suitable example.
5. Polymorphism
Show with an example how polymorphism is implemented.
🔁 Repeated Questions Across Unit 5
Question Repeated In
Class and object with program All 5 exams
Pure functions with example All 5 exams
Polymorphism with histogram example Exams 1, 3, 5
__init__ and __str__ methods with example Exams 1, 3, 5
Class Student with marks, percentage, and scorecard Exams 2, 4
Question Repeated In
using __init__(), display()
Rectangle class example / mutability / Turtle-based Exams 1, 3, 4, 5 (different aspects of
drawing the same class)