0% found this document useful (0 votes)
5 views11 pages

Python QB Final

The document is a comprehensive question bank for Python Programming for B.C.A. Semester IV/V at St Aloysius College, Mangaluru, covering various topics and questions from multiple past papers. It categorizes questions based on their frequency of appearance in exams, providing a priority system for students to focus their studies. The content is divided into two parts: Part A consists of short answer questions, while Part B includes unit-wise detailed questions.

Uploaded by

brahhh352
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views11 pages

Python QB Final

The document is a comprehensive question bank for Python Programming for B.C.A. Semester IV/V at St Aloysius College, Mangaluru, covering various topics and questions from multiple past papers. It categorizes questions based on their frequency of appearance in exams, providing a priority system for students to focus their studies. The content is divided into two parts: Part A consists of short answer questions, while Part B includes unit-wise detailed questions.

Uploaded by

brahhh352
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

St Aloysius College (Autonomous), Mangaluru

B.C.A. Semester IV/V — Python Programming

Complete Question Bank with Repetition Analysis

Based on: May/June 2023 | May 2024 | Dec 2022 | Feb 2022 | Apr/May 2025 (5 Papers)

Legend / Colour Guide Background & Badge Meaning

★★★ ×4 — ALL PAPERS Orange bg Asked in ALL 5 papers — top priority

★★★ ×3 Yellow bg Asked in 3–4 papers — high priority

★★ ×2 Light blue bg Asked in 2 papers — medium priority

✦ ×1 Grey bg Asked once — still prepare

PART – A | 2-Mark Questions (Answer any SIX / TEN)

Q1 What is the purpose of using type() function? Give an example.


Asked: May/June 2023, Feb 2022 ★★ ×2

Q2 Why is Python called a strongly typed and dynamic programming language?


Asked: May/June 2023 ✦ ×1

Q3 Write the syntax for accessing and modifying a dictionary.


Asked: May/June 2023 ✦ ×1

Q4 Differentiate tuples and lists. / Compare List and tuple.


Asked: May/June 2023, Dec 2022, Feb 2022 ★★★ ×3

Q5 What do you mean by Python type casting?


Asked: May/June 2023, Dec 2022 ★★ ×2

Q6 What is an @classmethod decorator?


Asked: May/June 2023 ✦ ×1

Q7 What is an exception? Mention its types. / Write a note on except Clause.


Asked: May/June 2023, Dec 2022 ★★ ×2

Q8 Mention the significance of super().


Asked: May/June 2023 ✦ ×1

Q9 What is the use of range() function? Give with an example.


Asked: May 2024, Feb 2022 ★★ ×2

Q10 How will you format the output in Python?


Asked: May 2024 ✦ ×1
Q11 What are nested loops? Give a coding example for the same.
Asked: May 2024 ✦ ×1

Q12 What is the significance of triple quotes in Python?


Asked: May 2024 ✦ ×1

Q13 How to create an empty set? Give an example. / How to create an empty list, tuple and
dictionary?
Asked: May 2024, Dec 2022, Feb 2022 ★★★ ×3

Q14 When should you use method overriding in your code?


Asked: May 2024 ✦ ×1

Q15 What are Access Specifiers in Python?


Asked: May 2024, Apr/May 2025 ★★ ×2

Q16 How can you create an empty Data Frame in Pandas?


Asked: May 2024 ✦ ×1

Q17 Write a program to find the smallest/largest divisor of an integer other than 1.
Asked: Dec 2022, Feb 2022 ★★ ×2

Q18 Why is indentation required in Python?


Asked: Dec 2022 ✦ ×1

Q19 List the different ways of importing modules.


Asked: Dec 2022 ✦ ×1

Q20 How to make a method return multiple values?


Asked: Dec 2022, Feb 2022 ★★ ×2

Q21 What is the difference between a thread and a process?


Asked: Dec 2022 ✦ ×1

Q22 What is the difference between a checkbutton and a radiobutton? / spinbox and listbox?
Asked: Dec 2022, Feb 2022 ★★ ×2

Q23 How to sort elements of a list and a tuple? / How to sort elements of a dictionary?
Asked: Dec 2022, May/June 2023, Feb 2022 ★★★ ×3

Q24 What are the different types of databases used in Python?


Asked: Dec 2022 ✦ ×1

Q25 How to clone a list?


Asked: Dec 2022 ✦ ×1
Q26 What is the difference between list and dictionary?
Asked: Feb 2022 ✦ ×1

Q27 How to determine the data type of a variable?


Asked: Feb 2022 ✦ ×1

Q28 List the naming conventions in Python.


Asked: Feb 2022 ✦ ×1

Q29 What is an abstract class?


Asked: Feb 2022 ✦ ×1

Q30 What is the difference between instance and instance variable of a class?
Asked: Feb 2022 ✦ ×1

Q31 How to add scrollbar to a window in Python?


Asked: Feb 2022 ✦ ×1

Q32 What is the difference between break and continue statements?


Asked: Feb 2022 ✦ ×1

Q33 Differentiate Local scope and Global scope.


Asked: Feb 2022 ✦ ×1

Q34 What is the significance of step value in range() function?


Asked: Apr/May 2025 ✦ ×1

Q35 Write the syntax of while loop in Python.


Asked: Apr/May 2025 ✦ ×1

Q36 What is dictionary? Give an example to create a dictionary with five key values.
Asked: Apr/May 2025 ✦ ×1

Q37 Define inheritance. Mention different types of inheritance present in Python.


Asked: Apr/May 2025 ✦ ×1

Q38 What do you mean by frozenset? Give an example.


Asked: Apr/May 2025 ✦ ×1

Q39 What do you mean by type conversion? Mention different types of type conversions.
Asked: Apr/May 2025 ✦ ×1

Q40 Write a Python code to connect to a database named Company.


Asked: Apr/May 2025 ✦ ×1

PART – B | Unit-wise Questions (Answer ONE full question per unit)


UNIT – I

Q1 [6 marks] List and explain the different flavors of Python.


Asked: May/June 2023 ✦ ×1

Q2 [6 marks] Explain the basic data types available in Python with examples.
Asked: May/June 2023 ✦ ×1

Q3 [5 marks] Explain the need for continue and break statements. Write a program to check
whether a number is prime.
Asked: May/June 2023 ✦ ×1

Q4 [4 marks] What is NumPy? Explain the creation of arrays using NumPy.


Asked: May/June 2023, May 2024, Dec 2022, Feb 2022 ★★★ ×4 — ALL PAPERS

Q5 [3 marks] Differentiate C and Python / Differentiate C, Java and Python.


Asked: May/June 2023, Dec 2022, Feb 2022 ★★★ ×3

Q6 [6 marks] What is NumPy? Explain the different methods in creation of arrays using NumPy
with an example.
Asked: May 2024 ✦ ×1

Q7 [6 marks] List and explain different array operations.


Asked: May 2024 ✦ ×1

Q8 [6 marks] With syntax and example explain any two loops.


Asked: May 2024, Feb 2022 ★★ ×2

Q9 [6 marks] List and explain any six salient features of Python.


Asked: May 2024 ✦ ×1

Q10 [5 marks] Write a note on special operators of Python.


Asked: Dec 2022 ✦ ×1

Q11 [5 marks] Write a note on assertion.


Asked: Dec 2022 ✦ ×1

Q12 [5 marks] Explain indexing and slicing with respect to multidimensional arrays.
Asked: Dec 2022 ✦ ×1

Q13 [5 marks] Explain the input and output statements of Python with syntax and example.
Asked: Dec 2022 ✦ ×1

Q14 [7 marks] Compare C and Python. / Compare C, Java and Python.


Asked: Feb 2022 ✦ ×1

Q15 [4 marks] Write a note on multidimensional arrays in Python.


Asked: Feb 2022 ✦ ×1
Q16 [4 marks] Explain the importance of indentation in Python.
Asked: Feb 2022 ✦ ×1

Q17 [4 marks] Discuss the int(), float(), str() and type() functions with examples.
Asked: Feb 2022 ✦ ×1

Q18 [4 marks] How to make functions return multiple values in Python? Explain.
Asked: Feb 2022 ✦ ×1

Q19 [7 marks] Write a note on Python Virtual Machine and Memory Management.
Asked: Feb 2022 ✦ ×1

Q20 [6 marks] Signify the role of input and output functions provided by Python language.
Asked: Apr/May 2025 ✦ ×1

Q21 [6 marks] Differentiate between Java and Python.


Asked: Apr/May 2025 ✦ ×1

Q22 [6 marks] Discuss different ways to iterate through an array in Python. Provide examples.
Asked: Apr/May 2025 ✦ ×1

Q23 [6 marks] Explain Type Conversion in Python with examples.


Asked: Apr/May 2025 ✦ ×1

UNIT – II

Q1 [5 marks] What are the different forms of user defined functions provided by Python?
Asked: May/June 2023 ✦ ×1

Q2 [4 marks] What are frozen sets? Elaborate.


Asked: May/June 2023 ✦ ×1

Q3 [3 marks] What are Python lists? How would you create a list in Python?
Asked: May/June 2023 ✦ ×1

Q4 [6 marks] Illustrate the following set methods with an example: intersection(), union(), issubset(),
difference(), update(), discard().
Asked: May/June 2023, Feb 2022 ★★ ×2

Q5 [3 marks] Write a program using slicing to determine whether a given string is a palindrome.
Asked: May/June 2023 ✦ ×1

Q6 [3 marks] How do you sort elements of a dictionary? Give an example.


Asked: May/June 2023, Feb 2022 ★★ ×2
Q7 [6 marks] Write different sequence data types in Python. Explain immutable data type with
example.
Asked: May 2024 ✦ ×1

Q8 [6 marks] Define a dictionary. Explain: keys(), values(), get(key), clear().


Asked: May 2024, Feb 2022 ★★ ×2

Q9 [6 marks] Differentiate: pop() vs remove(), Del vs pop(), append() vs insert().


Asked: May 2024 ✦ ×1

Q10 [6 marks] Explain any six string operations in Python with an example for each.
Asked: May 2024 ✦ ×1

Q11 [5 marks] Explain split() and map() string methods with example.
Asked: Dec 2022 ✦ ×1

Q12 [5 marks] Write short notes on: i) Creating tuple with one element ii) Nested tuple.
Asked: Dec 2022 ✦ ×1

Q13 [5 marks] Explain Named Arguments and Arbitrary Arguments with examples.
Asked: Dec 2022 ✦ ×1

Q14 [5 marks] Write a program to add/remove all characters in second string at the end of first string.
Asked: Dec 2022 ✦ ×1

Q15 [5 marks] Describe dictionary comprehension with suitable example.


Asked: Dec 2022 ✦ ×1

Q16 [5 marks] Write a Python program to implement: i) Union ii) Intersection iii) Difference of sets.
Asked: Dec 2022, Feb 2022 ★★ ×2

Q17 [4 marks] Write Python script to reverse the words of a given string.
Asked: Feb 2022 ✦ ×1

Q18 [4 marks] Explain any four dictionary methods.


Asked: Feb 2022 ✦ ×1

Q19 [7 marks] Explain list methods: append(), extend(), insert(), index() with examples.
Asked: Feb 2022 ✦ ×1

Q20 [4 marks] How to access the elements of a nested list? Explain with example.
Asked: Feb 2022 ✦ ×1

Q21 [7 marks] How are functions and anonymous functions defined and called? Explain with
example.
Asked: Feb 2022 ✦ ×1
Q22 [6 marks] Write a program that creates a list of 10 random integers. Create odd_list and even_list
from it.
Asked: Apr/May 2025 ✦ ×1

Q23 [6 marks] Tuples are immutable. Explain with Python programming example.
Asked: Apr/May 2025 ✦ ×1

Q24 [6 marks] Inspite of immutable feature, how to delete or remove elements from tuples? Explain
with example.
Asked: Apr/May 2025 ✦ ×1

Q25 [6 marks] What are the different methods available in Python List? Illustrate two methods with
an example.
Asked: Apr/May 2025 ✦ ×1

UNIT – III

Q1 [6 marks] Write a program to illustrate the use of objects as arguments.


Asked: May/June 2023 ✦ ×1

Q2 [6 marks] How to create and use classes and objects in Python? Illustrate with a programming
example.
Asked: May/June 2023, May 2024, Dec 2022, Feb 2022, Apr/May 2025 ★★★ ×5 — ALL PAPERS

Q3 [4 marks] Explain the concept of multilevel inheritance in Python with an example.


Asked: May/June 2023, May 2024, Feb 2022 ★★★ ×3

Q4 [4 marks] How can base class methods be overridden? Explain with a programming example.
Asked: May/June 2023, May 2024 ★★ ×2

Q5 [4 marks] What are abstract classes? Explain.


Asked: May/June 2023, Feb 2022, Apr/May 2025 ★★★ ×3

Q6 [6 marks] What is the lambda function? How is it different from normal function? Explain with an
example.
Asked: May 2024, Apr/May 2025 ★★ ×2

Q7 [6 marks] What is method overriding? Demonstrate the use of super() function with an example.
Asked: May 2024 ✦ ×1

Q8 [6 marks] Explain the different types of inheritances with an example.


Asked: May 2024, Dec 2022, Feb 2022 ★★★ ×3

Q9 [5 marks] How are constructors and destructors created and used in Python? Explain with
example.
Asked: Dec 2022, Feb 2022 ★★ ×2
Q10 [5 marks] How do you implement interfaces and abstract methods in Python? Give an example.
Asked: Dec 2022 ✦ ×1

Q11 [5 marks] How to create threads? Explain with example. / List and describe the methods provided
by the Thread class.
Asked: Dec 2022, Feb 2022 ★★ ×2

Q12 [5 marks] List the difference between method overloading and overriding.
Asked: Dec 2022 ✦ ×1

Q13 [5 marks] Write a program to handle user defined exception for AgeOutOfRangeException and
LowGpaException.
Asked: Dec 2022 ✦ ×1

Q14 [7 marks] How polymorphism can be achieved in Python? Explain.


Asked: Feb 2022 ✦ ×1

Q15 [4 marks] How inner classes are defined and used? Explain.
Asked: Feb 2022 ✦ ×1

Q16 [4 marks] How to raise the exception in Python? / List the benefits of using super() function.
Asked: Feb 2022 ✦ ×1

Q17 [6 marks] How do you create a user defined function and call it in main function? Explain with an
example.
Asked: Apr/May 2025 ✦ ×1

UNIT – IV

Q1 [4 marks] Explain creation of data frames with example.


Asked: May/June 2023 ✦ ×1

Q2 [4 marks] How database tables can be created in Python? Give an example.


Asked: May/June 2023 ✦ ×1

Q3 [4 marks] Explain: i) fetchone() ii) fetchall() with respect to Python database connectivity.
Asked: May/June 2023, Dec 2022 ★★ ×2

Q4 [6 marks] Explain user defined exceptions with an example.


Asked: May/June 2023 ✦ ×1

Q5 [6 marks] Explain how different data manipulation operations can be performed on a table in
Python.
Asked: May/June 2023 ✦ ×1

Q6 [6 marks] List and explain any five operations on Data Frames in Python.
Asked: May 2024 ✦ ×1
Q7 [6 marks] Explain exception handling in Python with an example.
Asked: May 2024, Dec 2022, Feb 2022 ★★★ ×3

Q8 [6 marks] Write a Python program which will throw exception if the value entered by user is
less than zero.
Asked: May 2024, Apr/May 2025 ★★ ×2

Q9 [6 marks] Explain the different steps involved in connecting Python to MySQL database and
fetch data with an example.
Asked: May 2024, Dec 2022 ★★ ×2

Q10 [5 marks] Explain the process of adding and deleting records to/from Python table with example.
Asked: Dec 2022 ✦ ×1

Q11 [5 marks] Differentiate between spinbox and listbox.


Asked: Dec 2022 ✦ ×1

Q12 [5 marks] Explain the process of using text, entry widget in Python.
Asked: Dec 2022 ✦ ×1

Q13 [5 marks] Write Python GUI program to create and use Menu widget.
Asked: Dec 2022, Feb 2022 ★★ ×2

Q14 [5 marks] Write Python program to demonstrate update and retrieve operations in the database.
Asked: Dec 2022 ✦ ×1

Q15 [7 marks] Explain the different types of databases used with Python.
Asked: Feb 2022 ✦ ×1

Q16 [8 marks] Write a Python database program to perform the different DML operations on database.
Asked: Feb 2022 ✦ ×1

Q17 [7 marks] How entry widget and Radiobuttons are created and used in Python? Explain with
example.
Asked: Feb 2022 ✦ ×1

Q18 [5 marks] Write a Python program to multiply two matrices.


Asked: Dec 2022 ✦ ×1

Q19 [5 marks] Explain the process of using the widget canvas in Python with a programming example.
Asked: Dec 2022 ✦ ×1

Q20 [6 marks] List and explain the different ways to create pandas data frame.
Asked: Apr/May 2025 ✦ ×1

Q21 [6 marks] How to add, update and retrieve data from database? Explain with code snippet.
Asked: Apr/May 2025 ✦ ×1
Q22 [6 marks] Explain any three operations that can be performed on a DataFrame.
Asked: Apr/May 2025 ✦ ×1

Repetition Summary — Topics Asked Across All 5 Papers

Topic / Question Papers (Years) Count

Classes and Objects in Python May/June 2023, May 2024, Dec 2022, Feb 2022, 5 ★★★
Apr/May 2025

NumPy and Array creation May/June 2023, May 2024, Dec 2022, Feb 2022 4 ★★★

Exception Handling / User defined exceptions May/June 2023, May 2024, Dec 2022, Feb 2022 4 ★★★

Inheritance (multilevel, types) May/June 2023, May 2024, Dec 2022, Feb 2022 4 ★★★

String Operations May/June 2023, May 2024, Dec 2022, Feb 2022 4 ★★★

Database Connectivity (MySQL/fetchone/fetchall) May/June 2023, May 2024, Dec 2022 3 ★★

Dictionary methods / sorting May/June 2023, May 2024, Feb 2022 3 ★★

List methods (pop/remove/append/insert) May/June 2023, May 2024, Feb 2022 3 ★★

Set operations (union, intersection, difference) May/June 2023, Feb 2022, Dec 2022 3 ★★

Type Casting / type() May/June 2023, Dec 2022, Feb 2022 3 ★★

Compare C and Python / C, Java, Python May/June 2023, Dec 2022, Feb 2022 3 ★★

Empty list/tuple/set/dictionary creation May 2024, Dec 2022, Feb 2022 3 ★★

Data Frames operations (Pandas) May/June 2023, May 2024, Apr/May 2025 3 ★★

Lambda function May 2024, Apr/May 2025 2 ★★

Abstract classes May/June 2023, Feb 2022, Apr/May 2025 3 ★★

Method Overriding + super() May/June 2023, May 2024 2 ★★

Constructors & Destructors Dec 2022, Feb 2022 2 ★★

Thread class / Multi-threading Dec 2022, Feb 2022 2 ★★

GUI Widgets (Menu, Entry, Canvas) Dec 2022, Feb 2022 2 ★★

DML operations on DB Dec 2022, Feb 2022 2 ★★

Sort elements of dictionary May/June 2023, Feb 2022 2 ★★

Loops (for/while with example) May 2024, Feb 2022 2 ★★

Exception: throw if value < 0 May 2024, Apr/May 2025 2 ★★

Type Conversion May/June 2023, Dec 2022, Feb 2022, Apr/May 2025 4 ★★★

Access Specifiers May 2024, Apr/May 2025 2 ★★

Features / Flavors of Python May/June 2023, May 2024 2 ★★

High-Priority Topics — Most Likely to Repeat (Updated for 5 Papers)

Rank Topic Reason / Note

1 Classes and Objects Asked in ALL 5 papers — absolute must-prepare

2 NumPy Arrays Asked in ALL 4 papers — guaranteed to come


Rank Topic Reason / Note

3 Exception Handling Asked in ALL 4 papers — always a full 6-mark question

4 Inheritance (types, multilevel) Asked in ALL 4 papers — full question every time

5 String Operations Asked in ALL 4 papers — appears in both Part A and Part B

6 Type Conversion / Type Casting Asked in 4 papers — Part A favourite

7 Database Connectivity (MySQL) Asked in 3 papers — fetchone, fetchall, DML

8 Dictionary methods Asked in 3 papers — keys(), values(), get(), sorting

9 List methods Asked in 3 papers — pop(), remove(), append(), insert()

10 Set operations Asked in 3 papers — union, intersection, difference

11 Compare C and Python Asked in 3 papers — Part B, Unit I

12 Empty data structures creation Asked in 3 papers — easy 2-mark question

13 Data Frames (Pandas) Asked in 3 papers — operations on DataFrame

14 Abstract classes Asked in 3 papers — Part B Unit III

15 Lambda function Asked in 2 papers — May 2024 & Apr/May 2025

16 Constructors & Destructors Asked in 2 papers — Unit III must-know

17 Threads / Multithreading Asked in 2 papers — Thread class methods

18 Method Overriding + super() Asked in 2 papers — always with programming example

19 GUI Widgets (Menu, Entry, Canvas) Asked in 2 papers — Unit IV

20 DML operations on DB Asked in 2 papers — Unit IV

21 Features / Flavors of Python Asked in 2 papers — Unit I opener

22 Access Specifiers Asked in 2 papers (2024 + 2025) — new trend

23 Exception: value < zero Asked in 2 papers — simple programming question

Document prepared from: May/June 2023 (G 601 DC1.4) | May 2024 (G 601 DC 1.4) | Dec 2022 (G 605.5) | Feb 2022 (G 605.5) | Apr/May
2025 (G 601 DC1.4) — St Aloysius College (Autonomous), Mangaluru | Repetition counts updated across all 5 Python papers.

You might also like