Skip to content

1BPLC105B / 1BPLC205B · 2025 · First year · Semesters 1 / 2

Python Programming

Same subject in either semester, depending on your cycle. Papers retain their original subject codes.

Back to subjects

Review status & sources

Similar question wording is grouped and ranked by the number of distinct exam sessions. Groups with the same count are ordered by their extracted text. Some subjects have only one session. Paper references show the PDF page and extracted question number when available.

Module 1

Differentiate between a syntax error and a runtime error with examples.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June/July 2026 · PDF page 1
  • Dec 2025/Jan 2026 · PDF page 1

Compare the for and while loops in Python with examples.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June/July 2026 · PDF page 1

Describe the Collatz 3n + 1sequence and explain how iteration and conditional statements are used in its implementation.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec 2025/Jan 2026 · PDF page 1
Show 2 Backup Questions

Explain break and continue statements with example.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec 2025/Jan 2026 · PDF page 1

Explain the salient features of Python.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec 2025/Jan 2026 · PDF page 1

Module 2

Explain the string (operations in Python for slicing, concatenation, repetition and comparison with suitable example.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • Dec 2025/Jan 2026 · PDF page 1
  • June/July 2026 · PDF page 1

Develop a program to count the number of words in a given line of text.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June/July 2026 · PDF page 1

Develop a Python program to sort a given list of numbers using Bubble sort from lowest to highest order.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec 2025/Jan 2026 · PDF page 1
Show 2 Backup Questions

Explain mutability in lists. Illustrate the difference between modifying a list and creating a clone of it using examples.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June/July 2026 · PDF page 1

Explain Python string handling method with example : find () , Upper () , isupper () , len ().

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec 2025/Jan 2026 · PDF page 1

Module 3

Define a dictionary in Python. Explain dictionary methods like key() and values( ).

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June/July 2026 · PDF page 2
  • Dec 2025/Jan 2026 · PDF page 1

Develop a program to sort the contents of a text file and write the sorted contents into a separate text file. [Hint: Use string methods strip(), len(), list methods sort(), append(), and file methods open(), readlines(), and write()]

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June/July 2026 · PDF page 2
  • Dec 2025/Jan 2026 · PDF page 2

What is Masking in NumPy. Develop a program to illustrate masking to filter array elements.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • Dec 2025/Jan 2026 · PDF page 2
  • June/July 2026 · PDF page 2
Show 2 Backup Questions

Develop a Python program to count the number of lines and words in the file.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec 2025/Jan 2026 · PDF page 2

Explain del statement in python dictionary.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June/July 2026 · PDF page 2

Module 4

Explain_init() and_ _str_() methods with examples.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June/July 2026 · PDF page 2
  • Dec 2025/Jan 2026 · PDF page 2

Define class and object. Explain with syntax and an example how to define class in Python. How to initiate a class and how the class members are accessed.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec 2025/Jan 2026 · PDF page 2

Define Scope and explain the different scopes in python. Also explain the lookup rules with examples.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June/July 2026 · PDF page 2
Show 2 Backup Questions

Describe the three import statement variants with suitable examples.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June/July 2026 · PDF page 2

Develop a program that simulates a simple stopwatch that records random time intervals and calculates the average elapsed time.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec 2025/Jan 2026 · PDF page 2

Module 5

Briefly explain Assertion and raising an exception.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec 2025/Jan 2026 · PDF page 2

Define Classes and Objects in python. Construct a class called rectangle and initialize it with height = 100, width = 200, starting point as (x = 0, y = 0) and write the method to display the center point coordinates of a rectangle.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June/July 2026 · PDF page 2

Define Polymorphism with a suitable python program.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June/July 2026 · PDF page 2
Show 2 Backup Questions

Describe deepcopy() and shallowcopy() with suitable code example.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June/July 2026 · PDF page 2

Explain the concept of operator overloading in Python. With suitable code snippets, demonstrate how the + operator is overloaded for a user-defined MyTime class. Also explain how the * operator can be overloaded using bothmul_() and_rmul() methods in a Point class.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June/July 2026 · PDF page 2