Syllabus
O Level
M1 R5: Information Technology Tools and Network Basics
Introduction to Computers
Office Automation Tools
Internet and Web Technologies
Networking Fundamentals
M2 R5: Web Designing and Publishing
HTML
CSS
Javascript
Web Hosting And Publishing
M3 R5: Programming and Problem Solving through Python
Introduction to Programming
Python Programming
Data Structures in Python
File Processing in Python
M4 R5: Internet of Things (IoT) and Its Applications
Introduction to IoT
IoT Architecture
IoT Applications
IoT Security and Challenges | Soft Skills
Courses
Under Graduate Courses
BA
BCA
B.COM
Post Graduate Courses
MCA
MBA
M.COM
MA
M.SC.(MATHS)
MSW
Institutional Courses
DCA
ADCA
DFA
DOAP
TALLY PRIME
JAVA
PYTHON
CCA
C Languages
Job Oriented Courses
Digital Marketing
Full Stack Development
Data Science
Cybersecurity and Ethical Hacking
Blockchain Development
Cloud Computing
Artificial Intelligence (AI) and Machine Learning
Government Courses
CCC
O LEVEL
A LEVEL
Mock Test
M1 R5: Information Technology Tools and Network Basics
M2 R5: Web Designing and Publishing
M3 R5: Programming and Problem Solving through Python
M4 R5: Internet of Things (IoT) and Its Applications
Old Papers
2025
New!
2024
New!
2023
New!
2022
New!
2021
New!
2020
New!
2019
New!
2018
New!
2017
New!
2016
New!
2015
New!
2014
New!
2013
New!
2012
New!
2011
New!
Assignments
HTML
CSS
Javascript
Python
Practical Questions
New!
Log in
Sign Up
O Level Papers!
M3 R5: Programming and Problem Solving through Python
Set
25
See Explanation !
1
what is 'f' in the following statement? f=open("Data.txt","r")
निम्नलिखित कथन में 'f' क्या है? f=open("Data.txt","r")
file name
file handle
Mode of file
file handling
Next Question
25
See Explanation !
2
Which of the following expressions results in an error?
निम्नलिखित में से किस अभिव्यक्ति के परिणामस्वरूप एक त्रुटि होती है?
float('10')
int('10')
float('10.8')
int('10.8')
Previous Question
Next Question
25
See Explanation !
3
What will be the output of np.array([[1,2],[3,4]]).shape?
Np.array([[1,2],[3,4 ]).shape का आउटपुट क्या होगा?
(2,)
(2,2)
(4,)
(1,4)
Previous Question
Next Question
25
See Explanation !
4
What will be the output of the following :print( (5*2-4*8)%7)
निम्नलिखित कोड का आउटपुट क्या होगा? : print( (5*2-4*8)%7)
7
8
10
6
Previous Question
Next Question
25
See Explanation !
5
What will be the output of the following Python code? example = "helle" print(example.rfind("e"))
निम्नलिखित कोड का परिणाम क्या है ? example = "helle" print(example.rfind("e"))
1
2
4
5
Previous Question
Next Question
25
See Explanation !
6
Suppose d = {“john”:40, “peter”:45}, what happens when we try to retrieve a value using the expression d[“susan”]?
मान लीजिए d = {“john”:40, “peter”:45}, तब क्या होता है जब हम d[“susan”] अभिव्यक्ति का उपयोग करके मान प्राप्त करने का प्रयास करते हैं?
Since “susan” is not a value in the set, Python raises a KeyError exception
It is executed fine and no exception is raised, and it returns None
Since “susan” is not a key in the set, Python raises a KeyError exception
Since “susan” is not a key in the set, Python raises a syntax error
Previous Question
Next Question
25
See Explanation !
7
What will be the output of the following Python code? print("xyyzxyzxzxyy".endswith("xyy", 0, 2))
निम्नलिखित पायथन कोड का आउटपुट क्या होगा? print(" xyyzxyzxzxyy ".endswith(" xyyy ", 0, 2))
0
1
True
False
Previous Question
Next Question
25
See Explanation !
8
Function blocks begin with the keyword _.
फ़ंक्शन ब्लॉक कीवर्ड_ से शुरू होते हैं।
function
method
def
None of the above
Previous Question
Next Question
25
See Explanation !
9
______ smallest individual unit or element in a program.
______ एक प्रोग्राम में सबसे छोटी व्यक्तिगत इकाई या तत्व।
Token
Keyword
Identifier
None of these
Previous Question
Next Question
25
See Explanation !
10
what is the output of the following code? M=['b' *x for x in range(4)] print(M)
निम्नलिखित कोड का परिणाम क्या है ? M=['b' *x for x in range(4)] print(M)
['', 'b', 'bb', 'bbb']
['b,'bb', "bbb', "bbbb']
['b','bb', bbb']
none of these
Previous Question
Next Question
25
See Explanation !
11
lstrip() method is used for :
lstrip () फंक्शन का उपयोग इसके लिए किया जाता है:
delete all the trailing whitespace characters
delete all the leading whitespace characters
delete all the leading and trailing whitespace characters
delete upper case characters
Previous Question
Next Question
25
See Explanation !
12
If we have two sets, s1 and s2, and we want to check if all the elements of s1 are present in s2 or not, we can use the function:
यदि हमारे पास दो सेट हैं, s1 और s2, और हम यह चेक करना चाहते हैं कि s1 के सभी एलिमेंट s2 में मौजूद हैं या नहीं, हम फ़ंक्शन का यूज़ कर सकते हैं:
s2.issubset(s1)
s2.issuperset(s1)
s1.issuperset(s2)
s1.isset(s2)
Previous Question
Next Question
25
See Explanation !
13
What will be the output of the following Python code? values = [[3, 4, 5, 1 ], [33, 6, 1, 2]] for row in values: row.sort() for element in row: print(element, end = " ") print()
निम्नलिखित पायथन कोड का आउटपुट क्या होगा? values = [[3, 4, 5, 1 ], [33, 6, 1, 2]] for row in values: row.sort() for element in row: print(element, end = " ") print()
The program prints two rows 3 4 5 1 followed by 33 6 1 2
The program prints on row 3 4 5 1 33 6 1 2
The program prints two rows 3 4 5 1 followed by 33 6 1 2
The program prints two rows 1 3 4 5 followed by 1 2 6 33
Previous Question
Next Question
25
See Explanation !
14
What will be the output of the following Python code snippet? a={1:"A",2:"B",3:"C"} print(a.get(3))
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
Error, invalid syntax
A
5
C
Previous Question
Next Question
25
See Explanation !
15
What will the following code output? print(5 ^ 3)
निम्नलिखित कोड आउटपुट क्या होगा? print(5 ^ 3)
6
1
2
Error
Previous Question
Next Question
25
See Explanation !
16
Which of the following refers to mathematical function?
निम्नलिखित में से कौन गणितीय फंक्शन को संदर्भित करता है
sqrt
rhombus
add
Sub
Previous Question
Next Question
25
See Explanation !
17
Which of the following is a feature of DocString?
डॉकस्ट्रिंग की निम्नलिखित में से कौन सी विशेषता है?
Provide a convenient way of associating documentation with Python modules, functions, classes, and methods.
All functions should have a docstring.
Docstrings can be accessed by the ___doc_attribute on objects.
All of the mentioned.
Previous Question
Next Question
25
See Explanation !
18
Which of the following functions will not result in an error when no arguments are passed to it?
जब कोई आर्ग्यमन्ट पास नहीं किया जाता हैं, तो निम्नलिखित में से कौन से फंक्शन में एरर आएगा ?
min()
divmod()
all()
float()
Previous Question
Next Question
25
See Explanation !
19
The ______ can be accessed only inside the function in which they are declared, whereas global variables can be accessed throughout the program body by all functions.
______ को केवल उस फ़ंक्शन के अंदर एक्सेस किया जा सकता है जिसमें उन्हें घोषित किया गया है, जबकि सभी फ़ंक्शन द्वारा पूरे प्रोग्राम बॉडी में ग्लोबल वेरिएबल्स को एक्सेस किया जा सकता है।
Global variables
local variables
datatype
None of these
Previous Question
Next Question
25
See Explanation !
20
What will be the output of the following Python code? a={} a[2]=1 a[1]=[2,3,4] print(a[1][1])
निम्नलिखित पायथन कोड का आउटपुट क्या होगा? a={} a[2]=1 a[1]=[2,3,4] print(a[1][1])
[2,3,4]
3
2
An exception is thrown
Previous Question
Next Question
25
See Explanation !
21
What is the output of the following code? def s(n1): print(n1) n1=n1+2 n2=4 s(n2) print(n2)
निम्नलिखित पायथन कोड का आउटपुट क्या होगा? def s(n1): print(n1) n1=n1+2 n2=4 s(n2) print(n2)
6 4
4 6
4 4
6 6
Previous Question
Next Question
25
See Explanation !
22
______ are the modes of both writing and reading in binary format in file.
______ फ़ाइल में द्विआधारी प्रारूप में लिखने और पढ़ने दोनों के तरीके हैं।
bw+
wb+
rb+
None of these
Previous Question
Next Question
25
See Explanation !
23
Which can contain multiple lines of text.
जिसमें टेक्स्ट की कई लाइनें हो सकती हैं।
Docstring
Python Package Index
both a & b
none of the mentioned
Previous Question
Next Question
25
See Explanation !
24
Which of the following is not a valid mode to open a file?
निम्नलिखित में से कौन सा फ़ाइल खोलने के लिए वैध मोड नहीं है?
ab
rw
r+
w+
Previous Question
Next Question
25
See Explanation !
25
Which of the following options can be used to read the first line of a text file data.txt?
टेक्स्ट फाइल data.txt की पहली लाइन को पढ़ने के लिए निम्न में से कौन सा विकल्प इस्तेमाल किया जा सकता है?
f = open('data.txt'); f.read()
f = open('data.txt','r'); f.read(n)
myfile = open('data.txt'); f.readline()
f= open('data.txt'); f.readlines()
Previous Question