🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

O Level Python Paper July 2025

Question: 1 Report Error

q = [3,4,5,20,5,25,13] के लिए, q.pop(1) का output क्या होगा?

What will be the output of q.pop(1) for q = [3,4,5,20,5,25,13]?

A)
B)
C)
D)
Explanation

In Python, pop(index) removes the element at the given index from the list and returns it.
Python में pop(index) method किसी सूची (list) से दिए गए index पर मौजूद element को हटाता है और उसे return करता है।

Index positions in the list are:

Index:  0   1   2   3   4   5   6  
Value:  3   4   5  20   5  25  13

So, q.pop(1) will remove and return the element at index 1, which is 4.

अब q.pop(1) का मतलब है index 1 पर स्थित element को हटाना और return करना।
Index 1 पर value है: 4

इसलिए, यह statement 4 return करेगा और list से 4 हटा दिया जाएगा।

 

Correct Answer: B) 4


Question: 2 Report Error

निम्नलिखित expression का सही मान क्या होगा?

What is the correct value of the following expression?

2 + 3 * 4 - 6
A)
B)
D)
Explanation

Expression:
2 + 3 * 4 - 6

➡️ पहले गुणा (Multiplication) होगा (BODMAS नियम के अनुसार):
3 * 4 = 12

➡️ फिर जोड़ (Addition):
2 + 12 = 14

➡️ फिर घटाना (Subtraction):
14 - 6 = 8


In English:
Using operator precedence (multiplication before addition and subtraction):
2 + 3 * 4 - 6 = 8

Correct Answer: B) 8


Question: 3 Report Error

निम्न NumPy कोड का आउटपुट क्या होगा?

What will be the output of the following NumPy code?

x = np.arange(1, 11, 2)
print(x)
A)
B)
C)
D)
Explanation

x = np.arange(1, 11, 2)
print(x)
np.arange(start, stop, step)
→ यहाँ:
start = 1,
stop = 11 (stop शामिल नहीं होता),
step = 2

इसलिए यह 1 से शुरू होकर हर बार 2 जोड़ता है जब तक 11 से कम है:

➡️ Output: [1, 3, 5, 7, 9]

In English:
np.arange(1, 11, 2) generates numbers from 1 to 10 with a step of 2.

Correct Answer: B) [1 3 5 7 9]


Question: 4 Report Error

math.log(64,2) का आउटपुट क्या होगा?

What will be the output of math.log(64,2)?

A)
B)
C)
D)
Explanation

import math
math.log(64, 2)
यह फंक्शन देता है:
➡️ 64 का base 2 में लॉगरिदम, यानी:

log2(64)=6(क्योंकि 2^6=64)


In English:
math.log(64, 2) returns the base-2 logarithm of 64.
Since 2^6 , the output is 6

Correct Answer: C) 6


Question: 5 Report Error

Python में print(5*(2//3)) का आउटपुट क्या होगा?

What will be the output of print(5*(2//3)) in Python?

A)
B)
C)
D)
Explanation

print(5 * (2 // 3))
2 // 3 → Floor division है, जो पूर्णांक भाग (integer part) देता है:
🔸 2 // 3 = 0 (क्योंकि 2 को 3 से divide करने पर भाग 0 आता है)

फिर:
5 * 0 = 0

In English:
// is floor division.

2 // 3 = 0, so 5 * 0 = 0

Correct Answer: A) 0


Question: 6 Report Error

Python में list comprehension का syntax कैसा होता है?

What does list comprehension syntax look like in Python?

A)
B)
C)
D)
Explanation

List comprehension का उपयोग Python में नई लिस्ट बनाने के लिए किया जाता है, सरल और कॉम्पैक्ट तरीके से।

✅ Syntax:

python
 
[expression for item in iterable]

🧪 Example:

python
 
squares = [x**2 for x in range(5)] print(squares) # Output: [0, 1, 4, 9, 16]

In English:

List comprehension provides a concise way to create lists.
Syntax: [expression for item in list]

Correct Answer: A) [expression for item in list]


Question: 7 Report Error

Python में कितने comparison operators होते हैं?

How many comparison operators are there in Python?

A)
B)
C)
D)
Explanation

Python में 6 Comparison Operators होते हैं:

Operator Meaning (अर्थ) Example
== बराबर है या नहीं 5 == 5 → True
!= बराबर नहीं है 5 != 3 → True
> बड़ा है 5 > 3 → True
< छोटा है 3 < 5 → True
>= बड़ा या बराबर 5 >= 5 → True
<= छोटा या बराबर 3 <= 5 → True

In English:

Python has 6 comparison operators used to compare values.

Correct Answer: B) 6


Question: 8 Report Error

q = [3,4,5,20,5,25,13] के लिए, q.pop(1) का output क्या होगा?

What will be the output of q.pop(1) for q = [3,4,5,20,5,25,13]?

A)
B)
C)
D)
Explanation

q = [3, 4, 5, 20, 5, 25, 13]
print(q.pop(1))


*pop(1) → Index 1 पर जो एलिमेंट है, उसे remove करता है और return करता है।

*Indexing 0 से शुरू होती है:

Index:   0  1  2   3   4   5   6  
List:   [3, 4, 5, 20, 5, 25, 13]


*Index 1 पर value है → 4

➡️ Output: 4


q.pop(1) removes and returns the element at index 1, which is 4.

Correct Answer: B) 4


Question: 9 Report Error

भाषा दक्षता (language efficiency) कैसे प्राप्त की जा सकती है?

Language efficiency can be achieved through:

A)
B)
C)
D)
Explanation

भाषा दक्षता (Language Efficiency) का मतलब है — कोड को कम समय और संसाधनों में प्रभावी तरीके से चलाना। इसे प्राप्त किया जा सकता है:

  • जब हम कोड को बार-बार उपयोग कर सकें, यानी Reusability हो।

🔁 Reusability से:

  • समय बचता है

  • कोड छोटा और कुशल होता है

  • एरर की संभावना कम होती है


In English:

Language efficiency refers to writing code that is effective and resource-efficient.
✅ Achieved through Reusability, which avoids redundancy and promotes optimized code.

Correct Answer: A) Reusability (पुन: प्रयोग)


Question: 10 Report Error

"Welcome to the course of Python.".find('of', 0, 20) का output क्या होगा?

What will be the output of "Welcome to the course of Python.".find('of', 0, 20)?

A)
B)
C)
D)
Explanation

"Welcome to the course of Python.".find('of', 0, 20)
.find(substring, start, end)
यह method substring को दिए गए start से end index के बीच ढूंढता है।
अगर substring मिलती है, तो उसकी index return करता है,
अगर नहीं मिलती तो -1 return करता है — न कि None.

👉 इसलिए सही output होगा: -1, लेकिन यह विकल्पों में नहीं है।

🔁 Corrected Answer:
✅ None is incorrect. The actual output is -1.

Correct Answer: D) None


Question: 11 Report Error

Python में child class parent class की properties कैसे access करती है?

How does a child class access the properties of a parent class in Python?

A)
B)
C)
D)
Explanation

Python में जब कोई child class (उपवर्ग) किसी parent class (मूल वर्ग) की properties और methods को access करता है, तो इसे inheritance कहते हैं।

🔹 यह Object-Oriented Programming (OOP) की एक मुख्य विशेषता है।


🧪 उदाहरण (Example):

python

class Parent:
    def show(self):
        print("I am Parent")

class Child(Parent):
    pass

c = Child()
c.show()  # Output: I am Parent

 

In English:

Inheritance allows a child class to access and reuse the attributes and methods of a parent class in Python.

Correct Answer: B) Inheritance / इनहेरिटेंस


Question: 12 Report Error

निम्नलिखित Python अभिव्यक्ति में x का मान क्या होगा?

What will be the value of x in the following Python expression?


x = int(43.55+2/2)
print(x)

A)
B)
C)
D)
Explanation

x = int(43.55 + 2 / 2)
print(x)
Step-by-step:
1. पहले डिविज़न (/) होता है:

2 / 2 = 1.0


2. फिर जोड़:

43.55 + 1.0 = 44.55


3. int() से कनवर्जन:
int(44.55) → Decimal हटाकर केवल integer हिस्सा लेता है, यानी 44

✅ Final Answer: 44

Correct Answer: B) 44


Question: 13 Report Error

6 का factorial (6!) क्या होगा?

What is the value of 6 factorial (6!)?

A)
B)
C)
D)
Explanation

Factorial (n!) का मतलब होता है:

n!=n×(n−1)×(n−2)×⋯×1

तो, 6! =

6×5×4×3×2×1=720


In English:

6! means:

6×5×4×3×2×1=720

Correct Answer: A) 720


Question: 14 Report Error

निम्नलिखित कोड का आउटपुट क्या होगा?

What will be the output of the following code?


t = (1,2)
print(2*t)

A)
B)
C)
D)
Explanation

t = (1, 2)
print(2 * t)


* जब आप एक tuple को किसी integer से multiply करते हैं, तो वह tuple उसी क्रम में बार-बार दोहराया जाता है।

उदाहरण:
python

2 * (1, 2) → (1, 2, 1, 2)


In English:
Multiplying a tuple by an integer repeats its contents:

python

(1, 2) * 2 = (1, 2, 1, 2)

Correct Answer: B) (1,2,1,2)


Question: 15 Report Error

ऐसी functions जो कोई मान (value) वापस नहीं करती हैं, उन्हें क्या कहा जाता है?

Functions that do not return any value are known as:

A)
B)
C)
D)
Explanation
  • ऐसे functions जो कोई value return नहीं करते, उन्हें void functions कहा जाता है।

  • ये सिर्फ कोई काम (task) करते हैं, लेकिन return statement नहीं होता या return के साथ कोई value नहीं देते

🧪 उदाहरण (Example):

python
 
def greet():
    print("Hello!")  # No return statement

यह function सिर्फ print करता है, कोई value वापस नहीं करता।


In English:

Functions that do not return a value are called void functions.
They may perform an action (like printing), but do not return anything.

Correct Answer: B) void functions


Question: 16 Report Error

Python में "A" + "BC" का आउटपुट क्या होगा?

What will be the output of "A" + "BC" in Python?

A)
B)
C)
D)
Explanation

"A" + "BC"
यह string concatenation (जोड़) है।

"A" और "BC" को जोड़ने पर बनेगा:

arduino

"ABC"
कोई स्पेस नहीं जोड़ा जाता जब तक आप manually न डालें।
✅ In English:
In Python, "A" + "BC" simply joins the two strings:
➡️ Output: "ABC"

Correct Answer: A) ABC


Question: 17 Report Error

NumPy में multidimensional array को क्या कहते हैं?

What is a multidimensional array in NumPy called?

A)
B)
C)
D)
Explanation

In NumPy, a multidimensional array is called an ndarray, which stands for "N-dimensional array". It can store data in 1D, 2D, 3D or more dimensions.

Hindi:
NumPy में multidimensional array को ndarray कहते हैं। इसका मतलब है "N-dimensional array", जो 1D, 2D, 3D या उससे ज्यादा dimensions में डेटा स्टोर कर सकता है।

Correct Answer: B) ndarray


Question: 18 Report Error

निम्न Python code का आउटपुट क्या होगा?

What will be the output of the following Python code?


for i in [1, 2, 3, 4][::-1]:
    print(i)
A)
B)
C)
D)
Explanation

Code:

 
for i in [1, 2, 3, 4][::-1]: print(i)

✅ English:

  • [1, 2, 3, 4][::-1] means the list is reversed.

  • So the loop becomes: for i in [4, 3, 2, 1], and it prints each number on a new line.

✅ Hindi:

  • [1, 2, 3, 4][::-1] का मतलब है लिस्ट को उल्टा कर देना।

  • इसलिए loop चलता है: for i in [4, 3, 2, 1], और हर नंबर नई लाइन में print होता है।

Correct Answer: B) 4,3,2,1


Question: 19 Report Error

निम्नलिखित कोड चलाने पर अंतिम बार क्या मुद्रित होता है?

What is the last thing printed when the following code is run?


number = 0
while number <= 10:
    print("Number: ", number)
    number = number + 1

A)
B)
C)
D)
Explanation

number = 0
while number <= 10:
    print("Number: ", number)
    number = number + 1
✅ English:
The loop starts with number = 0 and runs as long as number <= 10.

So it prints from Number: 0 to Number: 10.

After printing Number: 10, number becomes 11, and the loop stops.

Hence, the last printed line is: Number: 10

 

✅ Hindi:
यह loop तब तक चलता है जब तक number <= 10 होता है।

शुरुआत number = 0 से होती है और हर बार 1 बढ़ता है।

आखिरी बार number = 10 पर print होता है, फिर number = 11 हो जाता है और loop बंद हो जाता है।

Correct Answer: A) Number: 10


Question: 20 Report Error

नीचे दिए गए Python कोड का आउटपुट क्या होगा?

What will be the output of the following Python code?


def cube(x):
    return (x*x*x)

x = cube(3)
print(x)

A)
B)
C)
D)
Explanation

The function cube(x) returns the cube of a number.
cube(3) = 3 × 3 × 3 = 27

Hindi:
cube(x) फ़ंक्शन किसी संख्या का घन (cube) लौटाता है।
cube(3) = 3 × 3 × 3 = 27


Output: 27

Correct Answer: B) 27


Question: 21 Report Error

Python में print(~100) का आउटपुट क्या होगा?

What will be the output of print(~100) in Python?

A)
B)
C)
D)
Explanation

In Python, ~ is the bitwise NOT operator.
It flips all the bits of the number using this formula:

 x=−x−1\text{~x} = -x - 1

So,

 100=−100−1=−101\text{~100} = -100 - 1 = -101


Hindi:
Python में ~ एक bitwise NOT ऑपरेटर है।
यह संख्या के सभी बिट्स को उल्टा कर देता है और फॉर्मूला होता है:

 x=−x−1\text{~x} = -x - 1

इसलिए,

 100=−100−1=−101\text{~100} = -100 - 1 = -101


Final Output: -101

Correct Answer: A) -101


Question: 22 Report Error

इस Python कोड का आउटपुट क्या होगा?

What will be the output of this Python code?


str="Hello python"
print(str[-7:-4:1])

A)
B)
C)
D)
Explanation
  • The string is: "Hello python"

  • Negative index -7 refers to character 'o'
    (full string index: H(0) e(1) l(2) l(3) o(4) (5) p(6) y(7) t(8) h(9) o(10) n(11))

  • str[-7:-4:1] means: start from index -7 to index -4 (excluding -4), step 1

  • So it picks: 'o' (index -7), ' ' (index -6), 'p' (index -5)

  • Output: 'o p'


2. हिंदी में:

  • स्ट्रिंग है: "Hello python"

  • -7 index है 'o' (जो "Hello " के बाद आता है)

  • -4 index है 'y', लेकिन slicing में आखिरी index शामिल नहीं होता

  • तो characters मिलेंगे: 'o', ' ', 'p'

  • Output होगा: 'o p'


Final Output: o p

Correct Answer: B) o p


Question: 23 Report Error

निम्नलिखित कोड चलाने के बाद a,b,c का मान क्या होगा?

What is the value of a,b,c after executing the following code?

a,b,c=23,15,16
b,c,a=a+6,b+3,c+6
print(a,b,c)

A)
B)
C)
D)
Explanation

Step-by-step:

  • Initial values:
    a = 23, b = 15, c = 16

Now:

 
b = a + 6 → b = 23 + 6 = 29
c = b + 3 → c = 15 + 3 = 18
a = c + 6 → a = 16 + 6 = 22

Assignment happens simultaneously using original values.

So final values:
👉 a = 22, b = 29, c = 18
And the print(a, b, c) gives:
👉 22 18 29


हिंदी में:

  • शुरुआती मान:
    a = 23, b = 15, c = 16

फिर यह होता है:

  • b = a + 6 → 23 + 6 = 29

  • c = b + 3 → 15 + 3 = 18

  • a = c + 6 → 16 + 6 = 22

ध्यान दें कि यह सभी calculations original values से होती हैं।

👉 Final values: a = 22, b = 29, c = 18
👉 Print करता है: 22 18 29

Correct Answer: C) 29 18 22


Question: 24 Report Error

pickle module क्या करता है?

What does the pickle module do in Python?

A)
B)
C)
D)
Explanation

The pickle module in Python is used to serialize (convert to byte stream) and deserialize (reconstruct from byte stream) Python objects. This is useful for saving objects to a file or sending them over a network.

📌 Example:

 
import pickle data = {'a': 1, 'b': 2}
with open('data.pkl', 'wb') as f:
pickle.dump(data, f) # Serialize
with open('data.pkl', 'rb') as f:
loaded_data = pickle.load(f) # Deserialize

हिंदी में:

Python में pickle module का उपयोग Python objects को serialize (byte stream में बदलना) और deserialize (byte stream से वापस object बनाना) करने के लिए किया जाता है। इसका उपयोग डेटा को फाइल में सुरक्षित रखने या नेटवर्क पर भेजने के लिए किया जाता है।

Correct Answer: C) Serialize and deserialize Python objects


Question: 25 Report Error

निम्नलिखित कोड का आउटपुट क्या होगा?

What will be the output of the following code?


x=10
y=5
x,y=y,x
print(x,y)

A)
B)
C)
D)
Explanation
  • Initially: x = 10, y = 5

  • x, y = y, x swaps the values of x and y

  • So now: x = 5, y = 10

  • Output: 5 10


हिंदी में:

  • शुरू में: x = 10, y = 5

  • फिर x, y = y, x से दोनों की values आपस में बदल जाती हैं

  • अब: x = 5, y = 10

  • इसलिए output होगा: 5 10

Correct Answer: B) 5 10


Question: 26 Report Error

22//3 + 3/3 का आउटपुट क्या होगा?

What will be the output of: 22//3 + 3/3 ?


A)
B)
C)
D)
Explanation

Step-by-step Calculation:

  1. 22 // 3Floor division
    ⟶ 22 divided by 3 is 7.33, floor value = 7

  2. 3 / 3True division
    ⟶ 3 divided by 3 = 1.0

Now:

 
7 + 1.0 = 8.0

✅ Output is a float because 1.0 is float, so result becomes float too.

Correct Answer: B) 8.0


Question: 27 Report Error

EOF का full form क्या है?

What is the full form of EOF?

A)
B)
C)
D)
Explanation

EOF stands for End Of File.
It indicates the end of data in a file or stream when reading.

Example: When reading a file in Python, the program reaches EOF when there's no more data to read.



EOF का मतलब है एंड ऑफ़ फ़ाइल
यह दर्शाता है कि फ़ाइल या डेटा स्ट्रीम में अब और डेटा नहीं बचा है।

Correct Answer: B) End Of File / एंड ऑफ़ फ़ाइल


Question: 28 Report Error

random.shuffle() method किस data type की value accept करता है?

random.shuffle() method accepts the value of which data type?

A)
B)
C)
D)
Explanation

random.shuffle() सिर्फ list पर काम करता है क्योंकि list mutable होती है (उसे बदला जा सकता है)।
Strings और tuples immutable होते हैं, इसलिए उन्हें shuffle नहीं कर सकते सीधे।

random.shuffle() works only with lists because lists are mutable (can be changed).
Strings and tuples are immutable, so they can’t be shuffled directly.


अगर string या tuple को shuffle करना हो, तो पहले उसे list में बदलें।

Correct Answer: C) List / लिस्ट


Question: 29 Report Error

Python में यदि return statement के साथ कोई value नहीं दी जाए, तो वह क्या लौटाता है?

In Python, if a return statement has no value, what does it return?

A)
B)
C)
D)
Explanation

Python में, अगर return statement के साथ कोई value नहीं दी जाती, तो वह None लौटाता है।

In Python, if a return statement has no value, it implicitly returns None.


🔹 उदाहरण / Example:

 
def my_function():
return
result = my_function()
print(result) # Output: None

यहाँ return के साथ कोई value नहीं है, इसलिए function का output होगा: None

Correct Answer: C) None


Question: 30 Report Error

'abcdefg'[2:5] का output क्या होगा?

What is the output of 'abcdefg'[2:5]?

A)
B)
C)
D)
Explanation

Python में slicing का syntax होता है:

 
string[start : end]

यहाँ:

  • start index से शुरू होता है (include होता है),

  • लेकिन end index तक नहीं जाता (exclude होता है)।


उदाहरण:

 
'abcdefg'[2:5]
  • Index 2 → 'c'

  • Index 3 → 'd'

  • Index 4 → 'e'

  • Index 5 → excluded

इसलिए output होगा: 'cde'

Correct Answer: A) cde


Question: 31 Report Error

पायथन कोड का आउटपुट क्या है?

What is the output of Python code?

my_list = [3,1,4,1,5]
print(max (my_list))
A)
B)
C)
D)
Explanation

my_list = [3, 1, 4, 1, 5]
print(max(my_list))
अब max() function list में सबसे बड़ी value देता है:

List = [3, 1, 4, 1, 5]

Maximum value = 5

Correct Answer: B) 5


Question: 32 Report Error

Python में highest precedence किस operator की होती है?

Which operator has the highest precedence in Python?

A)
B)
C)
D)
Explanation

Python में operator precedence (आपरेटर की प्राथमिकता) यह तय करती है कि expressions में कौन सा ऑपरेटर पहले evaluate होगा।

Operator Description Precedence
** Exponentiation (घात) 🔝 Highest
*, / Multiplication/Div Medium
+, - Addition/Subtraction Lower
and Logical AND Even Lower

उदाहरण / Example:

 
result = 2 + 3 * 2 ** 2
# Step-by-step: # 2 ** 2 = 4 → highest precedence
# 3 * 4 = 12 → then multiplication
# 2 + 12 = 14 → then addition

So, correct answer is: C) **

Correct Answer: C) **


Question: 33 Report Error

अगर a और b एक जैसे shape की numpy arrays हैं, तो np.stack((a,b)) का क्या काम है?

If a and b are numpy arrays with the same shape, what does np.stack((a,b)) do?

A)
B)
C)
D)
Explanation

जब दो numpy arrays a और b की shape एक जैसी होती है, और हम लिखते हैं:

 
np.stack((a, b))

तो यह दोनों arrays को एक नई axis पर जोड़ देता है — यानी एक higher-dimensional array बनती है।


🔹 उदाहरण / Example:

 
import numpy as np
a = np.array([1, 2, 3]) b = np.array([4, 5, 6])
 
result = np.stack((a, b))
print(result)

Output:

 
[[1 2 3] [4 5 6]]

➡ अब result.shape होगा: (2, 3)
क्योंकि a और b एक-साथ stacked हो गए हैं — एक नए axis के along।

Correct Answer: A) दोनों arrays को जोड़कर एक नई array बनाता है / Joins both arrays into a new array along a new axis


Question: 34 Report Error

4 + 2**5 // 10 का output क्या होगा?

What is the output of 4 + 2**5 // 10?

A)
B)
C)
D)
Explanation

4 + 2**5 // 10
Python में operator precedence के अनुसार:

** (Exponentiation) सबसे पहले होता है

फिर // (Floor Division)

फिर + (Addition)

🔹 Step-by-step Evaluation:


python

2**5 = 32        # Step 1: Exponentiation
32 // 10 = 3     # Step 2: Floor division
4 + 3 = 7        # Step 3: Addition


✅ Final Output: 7

Correct Answer: B) 7


Question: 35 Report Error

2**3 + 5**2 का मान क्या होगा?

What is the value of 2**3 + 5**2?

A)
B)
C)
D)
Explanation

2**3 + 5**2
🔹 Step-by-step Evaluation:
2**3 = 8

5**2 = 25

8 + 25 = 33

✅ Final Answer: 33

Correct Answer: B) 33


Question: 36 Report Error

अगर s = "Information" हो, तो print(s[2:8]) का output क्या होगा?

If s = "Information", what is the output of print(s[2:8])?

A)
B)
C)
D)
Explanation

s = "Information"
print(s[2:8])


Python slicing syntax:

python

s[start : end]


*Start index = 2 → include होता है

*End index = 8 → exclude होता है

🔹 Indexing of "Information":

Index Character
0 I
1 n
2 f
3 o
4 r
5 m
6 a
7 t
8 i

➡ So, s[2:8] gives: 'format'

🔸 लेकिन ध्यान दें कि index 2 पर 'f' है, ना कि 'n'।
तो s[2:8] = 'format'

✅ Correct Answer: A) format

Correct Answer: A) format


Question: 37 Report Error

Python में == ऑपरेटर का उपयोग किसलिए होता है?

What is the purpose of == operator in Python?

A)
B)
C)
D)
Explanation

Python में == operator का उपयोग दो values की बराबरी जांचने (equality check) के लिए किया जाता है।

In Python, the == operator is used to compare two values and check if they are equal.


🔹 उदाहरण / Example:

 
a = 5
b = 5
 
print(a == b) # Output: True
 
x = "hello"
y = "world"
 
print(x == y) # Output: False

Correct Answer: B) Comparison (बराबरी जांचने) के लिए


Question: 38 Report Error

Python रनटाइम पर गुमनाम (anonymous) functions बनाने के लिए जिस construct का उपयोग करता है, उसे क्या कहा जाता है?

Python supports the creation of anonymous functions at runtime, using a construct called —–

A)
B)
C)
D)
Explanation

Python में anonymous functions (जिनका कोई नाम नहीं होता) बनाने के लिए lambda keyword का उपयोग किया जाता है।

In Python, the construct used to create anonymous functions at runtime is called lambda.


🔹 Example / उदाहरण:

 
# Lambda function to add two numbers
add = lambda x, y: x + y
print(add(5, 3)) # Output: 8

यहाँ lambda x, y: x + y एक anonymous function है जिसे हमने add नाम से reference दे दिया है।

Correct Answer: C) lambda


Question: 39 Report Error

निम्नलिखित कोड का आउटपुट क्या होगा?

What will be the output of the following code?


word = "Snow world"
print(word[4:7])
A)
B)
C)
D)
Explanation

Python में slicing का syntax होता है:

 
string[start : end]
  • Start index शामिल होता है (inclusive)

  • End index शामिल नहीं होता (exclusive)
    String: "Snow world"
    Indexes:

     

    Index Character
    0 S
    1 n
    2 o
    3 w
    4 ␣ (space)
    5 w
    6 o
    7 r
    8 l
    9 d

    word[4:7] का मतलब है:

    • Index 4 → ' ' (space)

    • Index 5 → 'w'

    • Index 6 → 'o'

    • Index 7 → excluded

    ➡ इसलिए Output: ' wo' (space + 'w' + 'o')

     

Correct Answer: C) wo


Question: 40 Report Error

किस NumPy function से array का median निकाला जाता है?

Which NumPy function is used to find the median of an array?

A)
B)
C)
D)
Explanation

NumPy में array का median (मध्य मान) निकालने के लिए इस्तेमाल होता है:

 
np.median()

np.median() calculates the middle value of a sorted NumPy array.
अगर elements की संख्या even हो, तो यह बीच के दो values का average देता है।


🔹 उदाहरण / Example:

 
import numpy as np
arr = np.array([10, 5, 2, 8])
print(np.median(arr)) # Output: 6.5

(क्योंकि sorted array: [2, 5, 8, 10], बीच के दो: 5 और 8, median = (5+8)/2 = 6.5)

Correct Answer: B) np.median()


Question: 41 Report Error

Logical OR operator का symbol क्या है?

What is the symbol of logical OR operator in Python?

A)
B)
C)
D)
Explanation

Python में logical OR operator का symbol है:

 
or

or का उपयोग दो conditions में से कोई एक True होने पर True return करने के लिए किया जाता है।


🔹 उदाहरण / Example:

 
a = 5
b = 10
 
if a > 3 or b < 5:
      print("Condition is True")

यहाँ a > 3 is True, तो पूरी condition True मानी जाएगी।

Correct Answer: B) or


Question: 42 Report Error

Python में "A" + "BC" का आउटपुट क्या होगा?

What will be the output of "A" + "BC" in Python?

A)
B)
C)
D)
Explanation

Python में + operator को strings के साथ इस्तेमाल करने पर यह concatenation (जोड़ना) करता है।

"A" + "BC" means: दोनों strings को जोड़ना
Output: "ABC"


🔹 Example:

 
print("A" + "BC") # Output: ABC

Correct Answer: A) ABC


Question: 43 Report Error

Python में नीचे दिए गए कोड का परिणाम क्या होगा?

What will be the result of the following Python code?


x = (1, 2, 3)
x[0] = 3


A)
B)
C)
D)
Explanation

x = (1, 2, 3)
x[0] = 3


यहाँ x एक tuple है, और tuples immutable होते हैं, यानी एक बार बनने के बाद उसके elements को बदला नहीं जा सकता।

➡ जब आप x[0] = 3 करने की कोशिश करेंगे, तो Python एक TypeError देगा।

🔹 Error message (Approximate):


plaintext

TypeError: 'tuple' object does not support item assignment

Correct Answer: C) TypeError


Question: 44 Report Error

Python में function के अंदर define किया गया variable क्या कहलाता है?

What is a variable defined inside a function in Python called?

A)
B)
C)
D)
Explanation

Python में यदि कोई variable function के अंदर define किया जाता है, तो उसे local variable कहा जाता है।

A variable defined inside a function is called a local variable because its scope is limited to that function only.


🔹 Example / उदाहरण:

 
def my_function():
x = 10 # यह एक local variable है
print(x)
my_function() # Output: 10
print(x) # ❌ Error, क्योंकि x function के बाहर accessible नहीं है

Correct Answer: B) local variable


Question: 45 Report Error

Binary संख्या 110001 का decimal में मान क्या होगा?

What is the decimal value of binary number 110001?

A)
B)
C)
D)
Explanation

Binary संख्या 110001 को Decimal में बदलने के लिए हम powers of 2 का उपयोग करते हैं।

Binary: 1 1 0 0 0 1
Positions (powers of 2):

 
2⁵ 2⁴ 2³ 2² 2¹ 2⁰
1 1 0 0 0 1

अब इन्हें जोड़ते हैं:

 
(1 × 2⁵) + (1 × 2⁴) + (0 × 2³) + (0 × 2²) + (0 × 2¹) + (1 × 2⁰)
= 32 + 16 + 0 + 0 + 0 + 1
= 49

✅ Final Answer: (b) 49

Correct Answer: B) 49


Question: 46 Report Error

Python में break और continue का अंतर क्या है?

What is the difference between break and continue in Python?

A)
B)
C)
D)
Explanation

Python में break और continue दोनों का उपयोग loops (जैसे for, while) में किया जाता है, लेकिन उनका काम अलग होता है:


break:

  • Loop को पूरी तरह से रोक देता है

  • यानी जहां break मिला, वहीं से loop बंद हो जाता है

 
for i in range(5):
if i == 3:
break
print(i)
# Output: 0 1 2

continue:

  • उस iteration को छोड़ देता है और अगली iteration पर चला जाता है

  • Loop चलता रहता है

 
for i in range(5):
if i == 3:
continue
print(i)
# Output: 0 1 2 4

Correct Answer: B) break exits loop, continue skips current iteration


Question: 47 Report Error

Python में कौन सा keyword function define करने के लिए प्रयोग होता है?

Which keyword is used to define a function in Python?

A)
B)
C)
D)
Explanation

Python में किसी function को define करने के लिए def keyword का उपयोग किया जाता है।

def stands for define, and it's the correct Python syntax to create a function.


🔹 Example / उदाहरण:

def greet():
    print("Hello, World!")

greet()
# Output: Hello, World!

 

Correct Answer: C) def


Question: 48 Report Error

Python में print(9//4*3 - 6*3//4) का आउटपुट क्या होगा?

What will be the output of print(9//4*3 - 6*3//4) in Python?

A)
B)
C)
D)
Explanation

🔹 Expression:

print(9 // 4 * 3 - 6 * 3 // 4)

Python में operator precedence के अनुसार:

  1. // (floor division) और * पहले होते हैं (left to right),

  2. फिर - (subtraction)

     

    🔹 Step-by-Step Evaluation:

    1. 9 // 4 = 2

    2. 2 * 3 = 6

    3. 6 * 3 = 18

    4. 18 // 4 = 4

    5. अब expression बन गया:
      6 - 4 = 2
      ✅ Final Output: 2

     

Correct Answer: B) 2


Question: 49 Report Error

Python में factorial निकालने के लिए सबसे अच्छा तरीका क्या है?

What is the best way to calculate factorial in Python?

A)
B)
C)
D)
Explanation

Python में factorial निकालने के कई तरीके हैं, लेकिन एक classical और elegant तरीका है — recursive function का उपयोग करना।

A recursive function is a function that calls itself to solve smaller instances of the same problem — perfect for factorials.


🔹 Recursive factorial function का उदाहरण:

def factorial(n):
    if n == 0 or n == 1:
        return 1
    else:
        return n * factorial(n - 1)

print(factorial(5))  # Output: 120

 

Correct Answer: B) Using a recursive function


Question: 50 Report Error

Python में type() function का क्या काम है?

What does the type() function do in Python?

A)
B)
C)
D)
Explanation

Python में type() function का उपयोग किसी object या variable का data type पता करने के लिए किया जाता है।

type() function returns the class/type of the object you pass to it.


🔹 Example / उदाहरण:

x = 10
print(type(x))     # Output: <class 'int'>

y = "Hello"
print(type(y))     # Output: <class 'str'>

 

Correct Answer: B) Return the data type of an object


Question: 51 Report Error

Python में नीचे दिए गए कोड का आउटपुट क्या होगा?

What will be the output of the following Python code?


L = [1, 2, 3, 4, 5]
print([x & 1 for x in L])

A)
B)
C)
D)
Explanation

Given Code:

 
L = [1, 2, 3, 4, 5]
print([x & 1 for x in L])
 

यह एक list comprehension है जो हर element x पर bitwise AND (&) operator लागू कर रही है।


🔹 Bitwise AND with 1:

x & 1 का मतलब होता है:

  • अगर x odd number है → result होगा 1

  • अगर x even number है → result होगा 0

क्योंकि odd numbers के binary में last bit 1 होती है, और even के लिए 0


🔹 Evaluation:

List: [1, 2, 3, 4, 5]

  • 1 & 1 = 1

  • 2 & 1 = 0

  • 3 & 1 = 1

  • 4 & 1 = 0

  • 5 & 1 = 1

➡ Result: [1, 0, 1, 0, 1]


✅ Final Answer: (b) [1, 0, 1, 0, 1]

Correct Answer: B) [1, 0, 1, 0, 1]


Question: 52 Report Error

Python में range(5) का आउटपुट क्या होगा?

What will range(5) generate?

A)
B)
C)
D)
Explanation

Python में range(n) एक sequence generate करता है:

range(n)0 से लेकर n-1 तक के numbers बनाता है (n शामिल नहीं होता)


🔹 Example / उदाहरण:

for i in range(5):
    print(i, end=' ')

Output:

 
0 1 2 3 4

Correct Answer: A) 0 1 2 3 4


Question: 53 Report Error

इस पायथन कोड को चलाने पर निम्नलिखित में से कौन सा कथन मुद्रित नहीं होगा?

Which of the following statements won’t be printed when this Python code is run?


for letter in 'Python':
    if letter == 'h':
        continue
    print('Current Letter : ' + letter)

A)
B)
C)
D)
Explanation

Code:

 
for letter in 'Python':
    if letter == 'h':
        continue
    print('Current Letter : ' + letter)

🔍 Code Logic:

  • Loop "Python" string के हर character पर चलेगा

  • अगर letter 'h' है, तो continue statement उसे skip कर देगा — यानी print नहीं होगा


🔹 Output होगा:

Current Letter : P
Current Letter : y
Current Letter : t
Current Letter : o
Current Letter : n

🔴 'h' पर कुछ print नहीं होगा क्योंकि continue उसे skip कर देता है

Correct Answer: C) Current Letter : h


Question: 54 Report Error

Python में truncation करने के लिए कौन सा method प्रयोग किया जाता है?

Which method is used to truncate a number in Python?

A)
B)
C)
D)
Explanation

Truncation का मतलब है किसी decimal संख्या से fractional हिस्सा हटा देना — यानी केवल integer part को रखना, बिना round किए।

Python में truncation के लिए इस्तेमाल होता है: math.trunc()


🔹 Example / उदाहरण:

 

import math

print(math.trunc(5.89))   # Output: 5
print(math.trunc(-3.14))  # Output: -3

➡ यह सिर्फ integer part को रखता है, भले ही number positive हो या negative।

Correct Answer: D) math.trunc()


Question: 55 Report Error

Python में write() function क्या return करता है?

What does the write() function return in Python?

A)
B)
C)
D)
Explanation

Python में जब आप किसी file में कुछ लिखते हैं:

f = open("demo.txt", "w")
chars_written = f.write("Hello")
print(chars_written)   # Output: 5

write() function उस string में लिखे गए characters की संख्या return करता है


🔹 Example:

f = open("file.txt", "w")
result = f.write("Python")
print(result)
# Output: 6 (क्योंकि "Python" में 6 characters हैं)

Correct Answer: C) Number of characters written


Question: 56 Report Error

निम्न Python कोड के आउटपुट में types क्या होंगी?

What will be the types printed by the following Python code?


print(type(5/2))
print(type(5//2))

A)
B)
C)
D)
Explanation

🔹 Explanation (Bilingual):

Python में division operators के दो प्रकार हैं:

  1. / (Normal Division)

  2. // (Floor Division)


🔸 5 / 2Normal Division

  • यह हमेशा float result देता है

  • 5 / 2 = 2.5

  • 👉 type(5 / 2)float


🔸 5 // 2Floor Division

  • यह integer result देता है (decimal को हटा देता है नीचे की ओर)

  • 5 // 2 = 2

  • 👉 type(5 // 2)int


🔹 Code:

print(type(5/2))   # Output: <class 'float'>
print(type(5//2))  # Output: <class 'int'>

Correct Answer: C) float and int


Question: 57 Report Error

Python में किसी variable (identifier) को खोजने का क्रम क्या है?

What is the order in which Python searches for an identifier?

A)
B)
C)
D)
Explanation

Python में जब किसी variable (identifier) को access किया जाता है, तो interpreter उसे LEGB rule के अनुसार खोजता है:

LEGB = Local → Enclosing → Global → Built-in


🔸 1. Local (L):

Current function/block के अंदर define हुआ variable

🔸 2. Enclosing (E):

अगर function किसी और function के अंदर है, तो outer function का scope

🔸 3. Global (G):

Module level (script level) पर defined variables

🔸 4. Built-in (B):

Python के inbuilt functions/objects (जैसे len, print, sum)


🔹 Example:

x = "global"

def outer():
    x = "enclosing"
    
    def inner():
        x = "local"
        print(x)  # Searches: Local → Enclosing → Global → Built-in
        
    inner()

outer()

Output: local

Correct Answer: B) Local → Enclosing → Global → Built-in


Question: 58 Report Error

नीचे दिए गए में से कौन सा loop कम से कम एक बार ज़रूर execute होता है, चाहे condition false हो?

Which of the following loops always executes the loop body at least once, even if the condition is false?

A)
B)
C)
D)
Explanation

do-while loop एक ऐसा loop होता है जो कम से कम एक बार ज़रूर चलता है, चाहे उसकी condition शुरू में false ही क्यों न हो।

क्योंकि do-while loop में पहले loop body execute होती है, फिर condition check होती है।


🔹 Python में do-while नहीं होता:

  • Python में directly do-while loop का support नहीं है।

  • लेकिन अन्य भाषाओं (जैसे C, C++, Java) में do-while ऐसा ही काम करता है।

      do {
        // code block
    } while (condition);

    यह block एक बार ज़रूर चलेगा, फिर condition check होगी।

     

Correct Answer: C) do-while loop


Question: 59 Report Error

नीचे दिए गए Python कोड का आउटपुट क्या होगा?

What will be the output of the following Python code?


x = 15

def f1(a, b=x):
    print(a, b)

f1(4)

A)
B)
C)
D)
Explanation

x = 15

def f1(a, b=x):
    print(a, b)

f1(4)

इस कोड में function f1 दो arguments लेता है:

  • arequired argument

  • bdefault argument, जिसकी value है x, और उस समय x = 15


🔍 क्या होता है:

  • जब function f1(4) को call किया गया, तो:

    • a = 4

    • b को कोई value नहीं दी गई, इसलिए इसका default value (x = 15) इस्तेमाल होगा

➡ Output: 4 15

❗ Important Note:

Default arguments को function definition के समय evaluate किया जाता है, call के समय नहीं

Correct Answer: A) 4 15


Question: 60 Report Error

Python में pow(2, 3, 5) का परिणाम क्या होगा?

What will be the result of pow(2, 3, 5) in Python?

A)
B)
C)
D)
Explanation
The pow() function in Python, when provided with three arguments, calculates (base ** exponent) % modulus.
 
In the given expression pow(2, 3, 5):
 
  • base is 2
  • exponent is 3
  • modulus is 5
First, 2 ** 3 is calculated, which equals 8.
Then, 8 % 5 is calculated, which is the remainder when 8 is divided by 5. This remainder is 3.
 
Therefore, the result of pow(2, 3, 5) in Python is 3.
 
The correct answer is (c) 3.

Correct Answer: C) 3


Question: 61 Report Error

Python list की index() विधि का क्या उद्देश्य है?

What is the purpose of the index() method in a Python list?

A)
B)
C)
D)
Explanation

Python में list.index(item) method का उपयोग list में दिए गए item का पहला index पता करने के लिए किया जाता है।

It returns the index (position) of the first occurrence of the specified value.


🔹 Example / उदाहरण:

fruits = ['apple', 'banana', 'cherry', 'banana']
print(fruits.index('banana'))   # Output: 1

➡ क्योंकि 'banana' सबसे पहले index 1 पर आता है।

Correct Answer: C) किसी item का पहला index ढूँढना (To find the first index of an item)


Question: 62 Report Error

NumPy में array बनाने के लिए कौन सा function उपयोग किया जाता है?

Which function is used to create an array in NumPy?

A)
B)
C)
D)
Explanation

NumPy में array बनाने के लिए array() function का उपयोग किया जाता है।


🔹 Example / उदाहरण:

import numpy as np

arr = np.array([1, 2, 3, 4])
print(arr)

Output:

 
[1 2 3 4]

Correct Answer: A) array()


Question: 63 Report Error

Python में nested function क्या होती है?

What is a nested function in Python?

A)
B)
C)
D)
Explanation

Python में nested function का मतलब होता है:

एक function के अंदर दूसरा function define करना।


🔹 Example / उदाहरण:

def outer():
    def inner():
        print("Hello from inner function")
    inner()

outer()

यहाँ inner() function, outer() के अंदर defined है — यही nested function कहलाता है।

Correct Answer: A) A function inside another function


Question: 64 Report Error

a और b वेरिएबल का डेटा टाइप क्या होगा?

What will be the data types of variables a and b?


var a = 10
var b = "Manish"

A)
B)
C)
D)
Explanation

a = 10
b = "Manish"

इसमें:

  • a को assign किया गया है 10 → यह एक integer है

  • b को assign किया गया है "Manish" → यह एक string है


🔍 Data types:

 
print(type(a))  # <class 'int'>
print(type(b))  # <class 'str'>

Correct Answer: B) Int and str


Question: 65 Report Error

यदि x = 1 है, तो x << 2 का परिणाम क्या होगा?

If x = 1, then what will be the result of x << 2?

A)
B)
C)
D)
Explanation

<< is the left shift operator in Python.

It shifts the bits of a number to the left by the given number of positions.


🔸 Given:

x = 1
x << 2

Means: Shift bits of 1 to the left by 2 positions


🔍 Binary Calculation:

  • 1 in binary = 0001

  • Shift left by 2: 00010100

That is:

1 << 2 = 1 × 2² = 4

Correct Answer: A) 4


Question: 66 Report Error

निम्नलिखित कोड का आउटपुट क्या होगा?

What will be the output of the following code?


print(-18//4)

A)
B)
C)
D)
Explanation

Given code:

 
print(-18 // 4)
 
यहाँ // है floor division operator, जो हमेशा नीचे की ओर (towards negative infinity) round करता है — not towards zero.

🔍 Step-by-step:

  • -18 ÷ 4 = -4.5

  • Floor division (//) rounds it down to the nearest integer:

    🔻 floor(-4.5) = -5


✅ Final Output: -5

Correct Answer: B) -5


Question: 67 Report Error

1011 का आउटपुट क्या होगा?

What will be the output of: 1011 ?

A)
B)
C)
D)
Explanation

The expression 1011 by itself (without any prefix or context) in Python is simply treated as a decimal integer.

print(1011)

Python इसे एक decimal number मानेगा — यानी:

➡ 1011 (base 10) = 1011

लेकिन अगर आप यह पूछ रहे हैं कि binary 1011 का decimal में क्या मान होगा, तो:

0b1011  → Binary literal

Then:

 
1×2³ + 0×2² + 1×2¹ + 1×2⁰
= 8 + 0 + 2 + 1 = 11

Correct Answer: C) Error


Question: 68 Report Error

NumPy में identity matrix बनाने के लिए क्या उपयोग किया जाता है?

Which NumPy function is used to create an identity matrix?

A)
B)
C)
D)
Explanation

Identity matrix एक square matrix होती है जिसमें:

  • main diagonal में सभी values = 1

  • बाकी सभी values = 0


🔹 NumPy में इसे बनाने के लिए:

import numpy as np

matrix = np.identity(3)
print(matrix)

Output:

[[1. 0. 0.]
 [0. 1. 0.]
 [0. 0. 1.]]

Correct Answer: B) np.identity()


Question: 69 Report Error

Flowchart में निर्णय (decision) के लिए कौन सा symbol उपयोग किया जाता है?

In a flowchart, which symbol is used for division (decision making)?

A)
B)
C)
D)
Explanation

Flowchart में विभिन्न कार्यों को दर्शाने के लिए अलग-अलग symbols का उपयोग किया जाता है:

Symbol उपयोग (Use)
🟦 Parallelogram Input/Output दिखाने के लिए
Rectangle किसी Process/Step को दिखाने के लिए
Oval Start या End को दर्शाने के लिए
🔷 Diamond Decision (जैसे Yes/No, True/False) को दिखाने के लिए ✅

🔸 उदाहरण / Example:

           🔷
         Is age > 18?
        /          \
      Yes          No
     /              \
 Process A        Process B

यहां निर्णय लेने के लिए Diamond symbol का उपयोग किया गया है।

Correct Answer: D) Diamond (Decision के लिए)


Question: 70 Report Error

निम्नलिखित NumPy कोड का आउटपुट क्या होगा?

What is the output of the following NumPy code?


arr = np.array([1,2,3,4,5])
print(np.sum(arr))

A)
B)
C)
D)
Explanation

Given NumPy code:

import numpy as np

arr = np.array([1, 2, 3, 4, 5])
print(np.sum(arr))

🔸 np.sum(arr) क्या करता है?

यह function array के सभी elements का योग (sum) करता है:

1 + 2 + 3 + 4 + 5 = 15

✅ Final Output: 15

Correct Answer: B) 15


Question: 71 Report Error

Python में नीचे दिए गए कोड का आउटपुट क्या होगा?

What will be the output of the following Python code?


L = [1, 2, 3, 4, 5]
print([x & 1 for x in L])

A)
B)
C)
D)
Explanation

Given code:

L = [1, 2, 3, 4, 5]
print([x & 1 for x in L])

यह एक list comprehension है, जिसमें x & 1 का इस्तेमाल हो रहा है।

🔸 क्या होता है x & 1?

यह एक bitwise AND operation है, जो x के last bit की जांच करता है:

  • यदि number odd है, तो x & 1 = 1

  • यदि number even है, तो x & 1 = 0       

       

    x Binary x & 1 Result
    1 0001 0001 1
    2 0010 0000 0
    3 0011 0001 1
    4 0100 0000 0
    5 0101 0001 1

    🔸 Output:

    [1, 0, 1, 0, 1]

     

Correct Answer: B) [1, 0, 1, 0, 1]


Question: 72 Report Error

इस कोड का आउटपुट क्या होगा?

What will be the output of this code?


a = 5
b = 1
c = 1 ^ 5
print(c)
A)
B)
C)
D)
Explanation

1 ^ 5 = 6  # Bitwise XOR

Because:

1  = 0001  
5  = 0101  
------------
XOR = 0110 → 6

✅ Output: 6

Correct Answer: D) 6


Question: 73 Report Error

क्या NumPy module को ऐसे import करना सही है?

Is it correct to import NumPy module like this?


import numpy as np

A)
B)
C)
D)
Explanation

import numpy as np

यह एक सही और standard तरीका है NumPy को import करने का।

  • यहाँ numpy को short name np दिया गया है,

  • जिससे बाद में np.array(), np.sum() आदि functions आसानी से इस्तेमाल किए जा सकते हैं।


🔸 Example:

import numpy as np

arr = np.array([1, 2, 3])
print(np.sum(arr))   # Output: 6

 

Correct Answer: A) Yes, completely correct


Question: 74 Report Error

कौन सा ऑपरेटर _gt_() overload किया जाता है?

Which operator is overloaded by the method _gt_() ?

A)
B)
C)
D)
Explanation

Python में special methods (जिसे dunder methods भी कहते हैं, जैसे __gt__()), operators को overload करने के लिए इस्तेमाल होते हैं।

  • __gt__() का मतलब है:
    "greater than" (>) operator को overload करना"


🔸 Example:

class MyNumber:
    def __init__(self, value):
        self.value = value

    def __gt__(self, other):
        return self.value > other.value

a = MyNumber(10)
b = MyNumber(5)

print(a > b)   # True → because __gt__() is called

 

Correct Answer: B) > (greater than)


Question: 75 Report Error

Python में single line comment लिखने के लिए कौन सा symbol प्रयोग होता है?

Which symbol is used to write a single line comment in Python?

A)
B)
C)
D)
Explanation

Python में single-line comment लिखने के लिए # symbol का उपयोग किया जाता है।


🔸 Example:

यह एक comment है
print("Hello, world!")  # यह भी एक inline comment है

# के बाद लिखा गया टेक्स्ट Python द्वारा ignore कर दिया जाता है।

Correct Answer: C) #


Question: 76 Report Error

NumPy में array बनाने के लिए निम्न में से कौन सा method प्रयोग कर सकते हैं?

Which of the following can be used to create NumPy arrays?

A)
B)
C)
D)
Explanation
  • np.empty() → Empty array (uninitialized)

  • np.ones() → Array filled with 1s

  • np.zeros() → Array filled with 0s

All are used to create NumPy arrays.

Correct Answer: D) All of the above


Question: 77 Report Error

Python फाइल की सही extension क्या है?

What is the correct extension of a Python file?

A)
B)
C)
D)
Explanation

Python फाइल की extension .py होती है।

Correct Answer: B) .py


Question: 78 Report Error

Python में कौन सा loop entry control loop है?

Which of the following is an entry control loop in Python?

A)
B)
C)
D)
Explanation
  • Python में for और while दोनों ही entry control loops हैं।
    इसका मतलब है कि ये loops condition पहले चेक करते हैं, फिर loop body execute होती है।

  • Python में do-while loop नहीं होता।

Correct Answer: D) both for and while


Question: 79 Report Error

Python में date और time को specific format में string में बदलने के लिए कौन सा method प्रयोग होता है?

In Python, which method is used to format date and time as a string?

A)
B)
C)
D)
Explanation

✅ Correct Answer: B) strftime

✔ Used to: Convert date/time to a formatted string in Python.

Correct Answer: B) strftime


Question: 80 Report Error

Python में identifier (जैसे variable, function name) की अधिकतम लंबाई कितनी हो सकती है?

What is the maximum length of an identifier in Python?

A)
B)
C)
D)
Explanation

Python में identifier (जैसे variable या function name) की कोई fixed maximum length limit नहीं है।

  • आप बहुत लंबा नाम रख सकते हैं (जितना system memory allow करे)।

  • लेकिन readability के लिए नाम छोटे और समझने लायक होने चाहिए।

Correct Answer: D) None / कोई नहीं


Question: 81 Report Error

मान्य निर्देशों (instructions) के निर्माण को नियंत्रित करने वाले formal grammar rules को क्या कहते हैं?

The formal grammar rules governing the construction of valid instructions are called:

A)
B)
C)
D)
Explanation
  • Syntax: किसी programming language के rules होते हैं जो बताते हैं कि instructions कैसे लिखे जाएँ ताकि कंप्यूटर उन्हें समझ सके।

  • यदि syntax गलत है, तो syntax error आता है।

Correct Answer: A) Syntax / सिंटैक्स


Question: 82 Report Error

Python dictionary में data कैसे store होता है?

How is data stored in a Python dictionary?

A)
B)
C)
D)
Explanation

In Python, a dictionary stores data as key-value pairs, where each unique key maps to a specific value.
Python में dictionary data को कुंजी-मूल्य जोड़े (key-value pairs) के रूप में संग्रहित करती है, जहाँ हर कुंजी एक विशिष्ट मान (value) से जुड़ी होती है।

Example / उदाहरण:

student = {"name": "Amit", "age": 20}

Here, "name" is a key and "Amit" is its value.
यहाँ "name" कुंजी है और "Amit" उसका मान है।

Correct Answer: C) Key-value pairs / कुंजी-मूल्य जोड़े


Question: 83 Report Error

EOL का full form क्या है?

What is the full form of EOL?

A)
B)
C)
D)
Explanation
  • English:
    EOL stands for End Of Line, which indicates the end of a line of text in programming or text files.

  • हिंदी (Hindi):
    EOL का मतलब होता है एंड ऑफ़ लाइन, जो प्रोग्रामिंग या टेक्स्ट फाइल में एक लाइन के अंत को दर्शाता है।

Correct Answer: A) End Of Line / एंड ऑफ़ लाइन


Question: 84 Report Error

Python में कौन सा valid arithmetic operator नहीं है?

Which of the following is NOT a valid Python arithmetic operator?

A)
B)
C)
D)
Explanation
  • English:
    && is not a valid arithmetic operator in Python. It is used in some other languages (like C, C++, Java) for logical AND.
    In Python, logical AND is written as and.

  • हिंदी (Hindi):
    && Python में एक वैध गणितीय (arithmetic) ऑपरेटर नहीं है। यह कुछ अन्य भाषाओं (जैसे C, C++, Java) में logical AND के लिए इस्तेमाल होता है।
    Python में logical AND के लिए and लिखा जाता है।


✅ Valid Arithmetic Operators in Python:

  • + → Addition (जोड़)

  • - → Subtraction (घटाव)

  • * → Multiplication (गुणा)

  • / → Division (विभाजन)

  • // → Floor Division (पूर्णांक विभाजन)

  • % → Modulus (शेषफल)

  • ** → Exponentiation (घात)

Correct Answer: D) &&


Question: 85 Report Error

range(0) की value क्या है?

What is the value of range(0)?

A)
B)
C)
D)
Explanation
  • English:
    range(0) creates a range object that starts at 0 and ends before 0 — which means it contains no values.
    So range(0) is equivalent to range(0, 0) → an empty range.

  • हिंदी (Hindi):
    range(0) एक ऐसा range object बनाता है जो 0 से शुरू होता है और 0 से पहले खत्म हो जाता है — यानी इसमें कोई भी मान नहीं होता।
    इसलिए range(0) का मतलब है range(0, 0) → एक खाली range


🔍 Output Example:

print(list(range(0)))   # Output: []

यह एक empty list देगा क्योंकि range में कोई भी नंबर नहीं है।

Correct Answer: B) range(0,0)


Question: 86 Report Error

Python में console से input लेने के लिए कौन सा function प्रयोग होता है?

Which function is used to accept console input in Python?

A)
B)
C)
D)
Explanation

Short Explanation (Bilingual):

  • English: input() is used to take user input from the console in Python.

  • हिंदी: Python में console से इनपुट लेने के लिए input() का उपयोग किया जाता है।

Example:

name = input("Enter your name: ")

Correct Answer: B) input()


Question: 87 Report Error

Python में इस code का output क्या होगा?

What will be the output?


a = 9
b = 1
print(a | b)

A)
B)
C)
Explanation
  • English: | is bitwise OR.
    9 | 11001 | 0001 = 10019

  • हिंदी: | बिटवाइज़ OR होता है।
    9 | 1 = 9

Correct Answer: C) 9


Question: 88 Report Error

नीचे दिए गए function का output क्या होगा?

What will be the output of the following function?


def C2F(c):
    return c*9/5+32
print(C2F(100))
print(C2F(0))

A)
B)
C)
D)
Explanation


The function converts Celsius to Fahrenheit using the formula:
F = (C × 9/5) + 32

C2F(100) → (100 × 9/5) + 32 = 180 + 32 = 212.0  
C2F(0)   → (0 × 9/5) + 32   = 0 + 32   = 32.0

हिंदी:
यह function Celsius को Fahrenheit में बदलता है:
फार्मूला है → (C × 9/5) + 32

C2F(100) = 212.0  
C2F(0)   = 32.0
✅ Output: 212.0, 32.0

Correct Answer: B) 212.0, 32.0


Question: 89 Report Error

नीचे में से कौन सा popular assembler नहीं है?

Which of the following is NOT a popular assembler?

A)
B)
C)
D)
Explanation
  • English:
    NASM, GAS, and ASM are popular assemblers used for low-level programming.
    C++ is a high-level programming language, not an assembler.

  • हिंदी:
    NASM, GAS, और ASM लोकप्रिय असेंबलर हैं।
    C++ एक उच्च स्तरीय प्रोग्रामिंग भाषा है, असेंबलर नहीं।

Correct Answer: D) C++


Question: 90 Report Error

नीचे में से कौन सा popular assembler नहीं है?

Which of the following is NOT a popular assembler?

A)
B)
C)
D)
Explanation


NASM, GAS, and ASM are popular assemblers used for low-level programming.
C++ is a high-level programming language, not an assembler.

हिंदी:
NASM, GAS, और ASM लोकप्रिय असेंबलर हैं।
C++ एक उच्च स्तरीय प्रोग्रामिंग भाषा है, असेंबलर नहीं।

Correct Answer: D) C++


Question: 91 Report Error

NumPy का full form क्या है?

What is the full form of NumPy?

A)
B)
C)
D)
Explanation
  • NumPy stands for Numerical Python. It is a powerful Python library used for numerical computations, arrays, matrices, etc.

  •     हिंदी:
    NumPy का पूरा नाम है Numerical Python। यह एक शक्तिशाली लाइब्रेरी है जो संख्यात्मक गणना (numerical computation), arrays और matrices के लिए उपयोग होती है।

Correct Answer: B) Numerical Python / न्यूमेरिकल पायथन


Question: 92 Report Error

Append mode में file खोलने के लिए कौन सा mode इस्तेमाल होता है?

Which mode is used to open a file in append mode?

A)
B)
C)
D)
Explanation
  • English:
    'a' mode is used to open a file in append mode, which adds data to the end of the file without deleting existing content.

  • हिंदी:
    'a' मोड का उपयोग append mode में फाइल खोलने के लिए होता है। इसमें नया डेटा फाइल के अंत में जोड़ा जाता है, और पुराना डेटा मिटता नहीं है।

Correct Answer: B) 'a'


Question: 93 Report Error

int('101') का output क्या होगा?

What will be the output of int('101')?

A)
B)
C)
D)
Explanation
  • English:
    int('101') converts the string '101' into an integer101 (base 10).

  • हिंदी:
    int('101') एक string '101' को पूराांक (integer) में बदलता है → 101 (दशमलव प्रणाली में)।

Correct Answer: A) 101


Question: 94 Report Error

नीचे दिए गए में से कौन सा immutable object है?

Which of the following is an immutable object?

A)
B)
C)
D)
Explanation
  • English:
    A tuple is an immutable object in Python — meaning its values cannot be changed after creation.

  • हिंदी:
    Tuple Python में एक immutable वस्तु है — यानी इसे एक बार बनाने के बाद बदला नहीं जा सकता

Correct Answer: C) Tuple / टपल


Question: 95 Report Error

Python में खुद से बनाए गए function को क्या कहते हैं?

What do we call a function whose name is chosen by the programmer?

A)
B)
C)
D)
Explanation
  • English:
    A user-defined function is a function created by the programmer, with a name chosen by the user.

  • हिंदी:
    User-defined function वह फंक्शन होता है जिसे प्रोग्रामर खुद बनाता है, और उसका नाम भी खुद तय करता है।


📌 Example / उदाहरण:

def greet():
    print("Hello!")

यह greet() एक user-defined function है।

Correct Answer: B) User-defined function / यूज़र-डिफ़ाइंड फंक्शन


Question: 96 Report Error

print(len('hello')) का output क्या होगा?

What will be the output of print(len('hello'))?

A)
B)
C)
D)
Explanation
  • English:
    len('hello') returns the number of characters in the string 'hello'.
    It has 5 characters: h, e, l, l, o

  • हिंदी:
    len('hello') string 'hello' में मौजूद अक्षरों की संख्या लौटाता है।
    इसमें 5 अक्षर हैं: h, e, l, l, o

Correct Answer: B) 5


Question: 97 Report Error

"abcde"[::-1] का output क्या होगा?

What will be the output of "abcde"[::-1]?

A)
B)
C)
D)
Explanation
  • English:
    "abcde"[::-1] uses string slicing with a step of -1, which means the string is reversed.

  • हिंदी:
    "abcde"[::-1] में slicing का step -1 है, जो string को उल्टा (reverse) कर देता है।


🔄 Result:

"abcde"[::-1] → "edcba"

Correct Answer: B) edcba


Question: 98 Report Error

File object के कौन से attributes होते हैं?

Which are attributes related to file objects?

A)
B)
C)
D)
Explanation
  • English:
    In Python, a file object has attributes like:

    • name → name of the file

    • closed → returns True if file is closed

    • mode → mode in which file was opened (e.g., 'r', 'w', 'a')

  • हिंदी:
    Python में file object के पास ये attributes होते हैं:

    • name → फाइल का नाम

    • closed → फाइल बंद है या नहीं (True/False)

    • mode → फाइल किस mode में खोली गई थी ('r', 'w', आदि)

Correct Answer: A) name, closed, mode


Question: 99 Report Error

Python में set को जोड़ने के लिए कौन सी method प्रयोग होती है?

Which method is used to add an element to a set in Python?

A)
B)
C)
D)
Explanation
  • English:
    In Python, to add an element to a set, the method used is add().

  • हिंदी:
    Python में किसी set में element जोड़ने के लिए add() method का उपयोग किया जाता है।


🔹 Example / उदाहरण:

my_set = {1, 2, 3}
my_set.add(4)
print(my_set)  # Output: {1, 2, 3, 4}

Correct Answer: A) add()


Question: 100 Report Error

math module से factorial(5) का output क्या होगा?

What will be the output of factorial(5) from the math module?

A)
B)
C)
D)
Explanation
  • English:
    math.factorial(5) calculates 5! (5 factorial), which is:
    5 × 4 × 3 × 2 × 1 = 120

  • हिंदी:
    math.factorial(5) का मतलब है 5 का factorial, यानी:
    5 × 4 × 3 × 2 × 1 = 120


✅ Example:

import math
print(math.factorial(5))  # Output: 120

Correct Answer: A) 120


Question: 101 Report Error

Python का कौन सा शब्द keyword नहीं है?

Which of the following is NOT a Python keyword?

A)
B)
C)
D)
Explanation
  • English:
    True, None, and pass are Python keywords.
    value is not a keyword; it's just a normal identifier/name.

  • हिंदी:
    True, None, और pass Python के keywords हैं।
    value कोई keyword नहीं है, बल्कि एक सामान्य नाम है।

Correct Answer: D) value


Related Papers



















































Latest Updates