Object Oriented Programming using Python — DU B.Sc. (Hons) Computer Science Previous Year Question Papers
- Programme
- B.Sc. (Hons) Computer Science
- Paper type
- DSC
- Paper code
- 2342011104
- Exam years
- 2023–2026
Object Oriented Programming using Python is a DSC paper in Semester I of B.Sc. (Hons) Computer Science at Delhi University (paper code 2342011104). 11 previous year question papers from 2023–2026 are listed below; view or download each original PDF.
2026 question papers
2026
2342011104B.Sc. (Hons) Computer Science
2025 question papers
2025
2342011104B.Sc. (Hons) Computer Science
2025
2342011104B.Sc. (Hons) Computer Science
2025
2342011104B.Sc. (Hons) Computer Science
2025
2342011104B.Sc. (Hons) Computer Science
2024 question papers
2024
2342011104B.Sc. (Hons) Computer Science
2024
2342011104B.Sc. (Hons) Computer Science
2024
2342011104B.Sc. (Hons) Computer Science
2023 question papers
2023
2342011104B.Sc. (Hons) Computer Science
2023
2342011104B.Sc. (Hons) Computer Science
2023
2342011104B.Sc. (Hons) Computer Science
What was asked in the 2026 Object Oriented Programming using Python paper?
Text of the DU question paper (UPC 2342011104), so you can see what gets asked before opening a PDF.
Q1 (a) Draw a flowchart to compute the factors of a given number. (5)
(b) Write python statements for the following (6)
i. Initializing x to 7 and incrementing the value by 1
ii. Assign a string to the variable str and print the subset of characters of the string.
iii. Store the integer division of x and y in z
(c) Write a function to check whether a given number is prime or not. (5)
(d) Give the output of the following code snippet: (6)
sum+=x print (sum)
ii. str='Hello'
print (stri::-1])
(e) Given the following dictionary (8)
Write python statements for the following:
i. Create the list of names and marks separately from the dictionary d.
ili. Display the list of names and marks in the following format
Name marks_obtained
Q2 (a) Write a function in python reverse (1st) that takes list 1st as a parameter and (5)
returns the reverse of 1st in a new list.
(b) Write a program to generate the following pattern where the height of the pattern, 'h', (5)
is input from the user.
(c) Give the output of the following code:
1. print (56**2//1883) print (10!=9 and 38>=38)
1ii.. print ("Nelcome'*4) 'Hello')
iv. print ('1' in v. print (16^23)
Q3 (a) Write a function that takes a string as input and returns the number of characters, vowels (5)
and words as a tuple.
(0) Lei's assume a siring-stri= 'house no123 , Rajnagar Extension, Uttar Pradesh',
Whet will be the output on executing each of the following statements:
i. print (strl.find ('no'))
ii. print (strl.split (' '))
iv. print (strl.is alpha))
v. print(str1.replacer'e'u'))
(c) Write a program using function to swap two numbers with and without using a (5)
temporary variable.
04 (a) Given the output of the following code snippets
ii. subject=' computer'
subject-list (subject)
for 1 in range (0, len (subject) -1) :
subject [1] subject [1+1]
subject [len (subject) -1]-ch print (' .join(subject))
Fruits-| 'lemon', 'orange', 'grapes', 'apple', 'pineapple', 'ki wi')
Vegetables-('spinach', 'caultiflower', 'lady finger') print (Fruits and Vegetables)
print (Fruits or Vegetables)
print (Fruits. add ('Pomegranate'))
(b) Write a program that takes a sentence as input and computes the frequency of vowels (6)
in it. Create a dictionary 'd" to store the vowels and their frequency present in the sentence.
Q5 (a) Write a function that reads the file "flle1. txt" and copies odd-numbered lines to (5)
another file, 'file2. txt'. Use appropriate exception handling during the file operations.
(b) Consider the following function computeSquareRoot () (6)
import math def computesquareRoot () :
a-int (input ('Enter the value'))
result-math.sqrt (a)
except ValueError:
print ('value error')
except TypeError:
print ('typeerror')
print ('unexpected error')
print (result)
print ('End task')
Determine the output for the above function call when the value entered for a= "h', a=' 13' and a=' -56'
(c) Find the error in the following code snippet: (4)
F1=open ('Al.txt')
F1. write ('welcome')
How can I prepare for Object Oriented Programming using Python?
Related subjects in B.Sc. (Hons) Computer Science
Frequently asked questions
- Where can I download the DU Object Oriented Programming using Python previous year question paper PDF?
- This page lists 11 Object Oriented Programming using Python question papers for B.Sc. (Hons) Computer Science at Delhi University (2023–2026). Open any paper to view the original PDF or download it. It is free and needs no login.
- Which years of Object Oriented Programming using Python question papers are available?
- Object Oriented Programming using Python papers are available for 2026, 2025, 2024, 2023.
- What is the paper code (UPC) of Object Oriented Programming using Python?
- The Unique Paper Code for Object Oriented Programming using Python in B.Sc. (Hons) Computer Science is 2342011104.
- Which semester is Object Oriented Programming using Python taught in?
- Object Oriented Programming using Python is a DSC paper in Semester I of B.Sc. (Hons) Computer Science, according to DU's published scheme.
