Skip to content

BPLCK105B / BPLCK205B · 2022 · First year · Semesters 1 / 2

Introduction to 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

Develop a program to read the name and year of birth of a person. Print whether person is senior citizen or not

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

View question scan & diagramsOriginal question scan, part 1
3 exam sessions
  • Dec-2023-Jan-2024 · PDF page 1
  • June-July-2024 · PDF page 1
  • June-July-2023 · PDF page 1

Demonstrate with example print ( ), input ( ) and string replication.

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

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June-July-2023 · PDF page 1
  • Dec-2023-Jan-2024 · PDF page 1

Develop a program to generate Fibonacci sequence of Length(N).Read N from the console.

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

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June-July-2024 · PDF page 1
  • June-July-2023 · PDF page 1
Show 2 Backup Questions

Explain Local and Gilobal scope with variables for each.

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

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June-July-2023 · PDF page 1
  • June-July-2024 · PDF page 1

Explain local and global scope with example.

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

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June-July-2024 · PDF page 1
  • Dec-2023-Jan-2024 · PDF page 1

Module 2

What is a List? Explain append ( ). insert () and remove ( ) methods with examples. ¡ Explain the following methods with example keys () ii) values ( ) items ( ) in a dietionary.

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

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June-July-2023 · PDF page 1
  • Dec-2023-Jan-2024 · PDF page 1

Develop a program to compute Mean, Variance, Standard deviation with message.

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

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

Develop a program using dictionary to print Ten most frequently appearing word in a text file.

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

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

Differentiate between list and dictionary.

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

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 1

Differentiate List and dictionaries.

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

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

Module 3

Develop a program to sort the content of a text file and write the sorted content into separate file.

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

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

Develop a program to sort the contents of a text file and write the soned contents into a separate text filc. [Lsc strip ( ) . len ( ). list methods sort () . append and file methods open ( ) , readlines ( ) and write (H. Moduk - +

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

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

Differentiate between absolute and relative path in specify filc path.

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

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

Discuss the following methods of OS module i) chdir() ii) rmdir() iii) walk() iv) list dire() Read multidigit number from console. Develop a program t0 print frequency of occurrence of cach digit with suitable message.

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

View question scan & diagramsOriginal question scan, part 1Original question scan, part 2
1 exam session
  • Dec-2023-Jan-2024 · PDF page 1

Explain about in and not in operators in string.

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

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

Module 4

How do you copy files and folders using Shutil module? Explain in detail.

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

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June-July-2024 · PDF page 2
  • June-July-2023 · PDF page 2

Q-8 With suitable code, explain Backing up a Folder into a Zip file. Clearly mention the steps involved.

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

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June-July-2023 · PDF page 2
  • June-July-2024 · PDF page 2

What are Assertions? Write the contents of an assert statement. Explain them with examples. Hustrate the logging levels in python.

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

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • June-July-2023 · PDF page 2
  • June-July-2024 · PDF page 2
Show 2 Backup Questions

Definc assertions. What does an assert statement in python consists of? Give an example. TDevelop a program to sort contents of a text file and write the forted content into a separate file.

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

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 2

Develop a program with a function named DivExp which takes Two parameters a, b and returns a value c(c = a/b), write suitable assertion for a > 0 in function DivExp and raise an exception for when b = 0. Develop a suitable program which reads two values from the console and calls a function DivExp.

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

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

Module 5

What is a class? 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
3 exam sessions
  • June-July-2023 · PDF page 2
  • June-July-2024 · PDF page 2
  • Dec-2023-Jan-2024 · PDF page 2

Define pure function. Illustrate with an example. *****ą

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

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

Discuss operator overloading. Mention any five operators with respective special function to be overloaded in python.

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

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

Discuss type based dispatch in python.

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

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 2

Explain - init() and - str() method with an example.

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

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 2