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

O Level Python Model Paper 2025

Question: 8 Report Error

पायथन किस भाषा में लिखा गया है?

In which language is Python written?

A)
B)
C)
D)
Explanation

Python is implemented in C, which means the Python interpreter itself is written in the C programming language.

Correct Answer: B) C


Question: 9 Report Error

पाइथन कितने कंट्रोल स्टेटमेंट को सपोर्ट करता है?

How many control statements python supports?

A)
B)
C)
D)
Explanation

Python supports 3 control statements that help control the flow of execution in a program. These can be categorized as follows:

  • break (Exits the nearest enclosing loop)
  • continue (Skips the current iteration and moves to the next one)
  • pass (A placeholder statement that does nothing; used for syntactical correctness)

Correct Answer: A) 3


Question: 10 Report Error

पहचानकर्ताओं से निपटने के दौरान पाइथन केस संवेदनशील है?

Is Python case sensitive when dealing with identifiers?

A)
B)
C)
D)
Explanation

Yes, Python is case sensitive when dealing with identifiers. This means that identifiers with different capitalization are treated as distinct.

Correct Answer: A) Yes


Question: 14 Report Error

अजगर के लिए पिप का क्या अर्थ है?

What does pip stand for python?

A)
B)
C)
D)

Question: 17 Report Error

निम्नलिखित प्रोग्राम का आउटपुट क्या है:

What is the output of the following program:

print("Hello World"[::-1])
A)
B)
C)
D)
Explanation

Let's break down the code:

print("Hello World"[::-1])
  • The string "Hello World" is being sliced using [::-1].
  • The [::-1] slice notation means "reverse the string."

So, the string "Hello World" reversed becomes "dlroW olleH".

Thus, the correct output is:

(A) dlroW olleH.

Correct Answer: A) dlroW olleH


Question: 22 Report Error

पायथन में निम्नलिखित अभिव्यक्ति का परिणाम क्या होगा

What will be the result of the following expression in Python “2 ** 3 + 5 ** 2”?

A)
B)
C)
D)
Explanation

Let's break down the expression:

2 ** 3 + 5 ** 2
  1. Exponentiation first (since ** has higher precedence):

    • 2 ** 3 = 8
    • 5 ** 2 = 25
  2. Now, perform the addition:

    • 8 + 25 = 33

So, the result is 33.

The correct answer is (B) 33.

Correct Answer: B) 33


Question: 23 Report Error

नीचे दिए गए कोड स्निपेट में var का डेटाटाइप क्या होगा?

What will be the datatype of the var in the below code snippet?

var = 10
print(type(var)) 
var = "Hello" 
print(type(var))
A)
B)
C)
D)
Explanation

The variable var first holds an integer 10 (so its type is int), and then it holds a string "Hello" (so its type becomes str).

So, the answer is (D) int and str.

Correct Answer: D) int and str


Question: 24 Report Error

पायथन में दावा कैसे अक्षम किया जा सकता है?

How can assertions be disabled in Python?

A)
B)
C)
D)

Question: 26 Report Error

नीचे दिए गए कोड स्निपेट में ___ क्या होगा?

What will be the output of the following code snippet?

a=[1,2,3,4,5,6,7,8,9]
a[::2]=10,20,30,40,50,60
print(a)
A)
B)
C)
D)
Explanation

You are trying to replace 5 elements (from indices 0, 2, 4, 6, 8) with 6 new values. This causes a mismatch in size, resulting in a ValueError.

So, the answer is (A) ValueError: attempt to assign sequence of size 6 to extended slice of size 5.

Correct Answer: A) ValueError: attempt to assign sequence of size 6 to extended slice of size 5


Question: 27 Report Error

निम्नलिखित सूची में फेरबदल करने के लिए सही कमांड क्या है?

What is the correct command to shuffle the following list?

fruit=['apple', 'banana', 'papaya', 'cherry']
A)
B)
C)
D)
Explanation

To shuffle a list in Python, you need to use the shuffle function from the random module. The correct command is:

random.shuffle(fruit)

So, the correct answer is (C) random.shuffle(fruit).

Correct Answer: C) random.shuffle(fruit)


Question: 28 Report Error

नीचे दिए गए कथनों में से कौन सा/से सत्य है/हैं?

Which of the following statements given below is/are true?

A)
B)
C)
D)

Question: 29 Report Error

निम्नलिखित कोड का परिणाम क्या है:

What is the output of the following code:

L=[‘a’,’b’,’c’,’d’]
print ( “”.join(L))
A)
B)
C)
D)
Explanation

The code snippet:

L = ['a', 'b', 'c', 'd']
print("".join(L))
  • The join() method is used to join elements of a list into a single string.
  • The "" before .join(L) means that there will be no separator between the elements of the list.
  • It will join the elements 'a', 'b', 'c', and 'd' into the string "abcd".

So, the output is:

(C) abcd.

Correct Answer: C) abcd


Question: 30 Report Error

निम्नलिखित प्रोग्राम का आउटपुट क्या है: (9//2)

What is the output of the code print

A)
B)
C)
D)
Explanation

The code 9 // 2 uses the floor division operator //, which divides the number and rounds down to the nearest integer.

  • 9 // 2 results in 4, as the division of 9 by 2 is 4.5, and floor division rounds it down to 4.

So, the correct answer is:

(C) 4.

Correct Answer: C) 4


Question: 31 Report Error

निम्नलिखित प्रोग्राम का आउटपुट क्या है:

What is the output of the following program:

i = 0
while i < 3:
      print (i) 
      i=i+1 
      print (i+1)
A)
B)
C)
D)
Explanation

The code prints two numbers in each loop iteration: the current value of i and i + 1.

  • First, i = 0 → prints 0 and 2
  • Then, i = 1 → prints 1 and 3
  • Finally, i = 2 → prints 2 and 4

So, the output is 0 2 1 3 2 4.

The correct answer is (A) 0 2 1 3 2 4.

Correct Answer: A) 0 2 1 3 2 4


Question: 32 Report Error

निम्नलिखित प्रोग्राम का आउटपुट क्या है:

What will be the output of the following Python code?

str1="helloworld" 
str1[::-1]
A)
B)
C)
D)
Explanation

The code str1[::-1] reverses the string str1.

Explanation:

  • str1 = "helloworld"
  • The slice notation [::-1] reverses the string.

So, "helloworld"[::-1] becomes "dlrowolleh".

The correct answer is:

(A) dlrowolleh.

Correct Answer: A) dlrowolleh


Question: 34 Report Error

पीवीएम को प्राय: कहा जाता है।

PVM is often called .

A)
B)
C)
D)

Question: 35 Report Error

कौन सा कथन सही है??

Which statement is correct??

A)
B)
C)
D)

Question: 36 Report Error

शब्दकोश में है:

Dictionary has:

A)
B)
C)
D)

Question: 38 Report Error

for i in range (-5,0,1) चलेगा

for i in range (-5,0,1) will run

A)
B)
C)
D)
Explanation

Let's analyze the code:

for i in range(-5, 0, 1):
  • The range() function takes three arguments: start, stop, and step.
    • start = -5
    • stop = 0 (but 0 is not included in the range)
    • step = 1

This means the loop will iterate over the values: -5, -4, -3, -2, -1.

So, the loop runs 5 times.

The correct answer is:

(B) 5 times.

Correct Answer: B) 5 times


Question: 39 Report Error

कौन सा सच नहीं है:

Which is not true:

A)
B)
C)
D)

Question: 41 Report Error

सीएसवी का मतलब है|

csv stands for

A)
B)
C)
D)

Question: 44 Report Error

निम्नलिखित आदेशों को क्रियान्वित करने पर, numpy में प्रसारण का उत्पादन होगा

On executing the following commands, Broadcasting in numpy will produce

a = np.array((0,10,20,30))
b = np.array((0,1,2)) 
y = a[:, None] + b
A)
B)
C)
D)
Explanation

The operation a[:, None] + b adds b (shape (3,)) to each element of a (shape (4,)) by broadcasting. This creates a (4, 3) array:

[[ 0  1  2]
 [10 11 12]
 [20 21 22]
 [30 31 32]]

So, the correct answer is (D).

Correct Answer: D) [[ 0 1 2] [10 11 12] [20 21 22] [30 31 32]]


Question: 46 Report Error

round(0.5) - round(-0.5) का नतीजा क्या है?

What is the result of round(0.5) – round(-0.5)?

A)
B)
C)
D)
Explanation

In programming languages, the round() function rounds towards the nearest even integer when the value is exactly halfway between two integers (this is known as "bankers' rounding").

So:

  • round(0.5) is 0 (rounded to the nearest even integer).
  • round(-0.5) is also 0 (rounded to the nearest even integer).

Therefore:

0−0=00 - 0 = 0

So, the correct result of round(0.5) - round(-0.5) is 0.

Correct Answer: C) 0(Zero)


Question: 52 Report Error

कौन सी सूची अनुक्रमणिका उपरोक्त सूची से ‘red’ मान का चयन करेगी

Which list index would select the value 'red' from the above list

colors = ["red", "green", "burnt sienna", "blue"]
A)
B)
C)
D)
Explanation

To select the value 'red' from the list colors = ["red", "green", "burnt sienna", "blue"], you would use the index 0.

In Python, list indexing starts at 0, so:

 
colors[0] # This will return 'red'

Thus, the correct index is 0.

Correct Answer: B) 0


Question: 53 Report Error

वर्गों का आउटपुट क्या होगा = {x: x*x for x in range(6)}

What will be the output of squares = {x: x*x for x in range(6)}

A)
B)
C)
D)
Explanation

The code creates a dictionary where each key is a number from 0 to 5, and the value is its square.

So, the output is:

{0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}

The correct answer is (C).

Correct Answer: C) {0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}


Question: 54 Report Error

वह कौन सा व्यंजक है जो 'baz' में 'z' लौटाता है?

What is the expression that returns the 'z' in 'baz'?

x=[10, [3.141, 20, [30, 'baz', 2.718]]]
A)
B)
C)
D)
Explanation

To access the 'z' in the string 'baz' from the given list:

 
x = [10, [3.141, 20, [30, 'baz', 2.718]]]

The string 'baz' is located in the third position of the nested list (inside x[1][2]), and you can access the character 'z' by indexing into the string:

 
x[1][2][1][2]

Here's the breakdown:

  • x[1] accesses the second element of the outer list: [3.141, 20, [30, 'baz', 2.718]].
  • x[1][2] accesses the third element of that list: [30, 'baz', 2.718].
  • x[1][2][1] accesses the second element of that inner list: 'baz'.
  • x[1][2][1][2] accesses the third character of the string 'baz', which is 'z'.

So, the correct expression is:

 
x[1][2][1][2]

Correct Answer: C) x[1][2][0][2]


Question: 55 Report Error

पायथन सूचियों और टुपल्स के बीच मुख्य अंतर क्या है?

What’s the main difference between Python lists and tuples?

A)
B)
C)
D)

Question: 56 Report Error

आप वेरिएबल a को लंबाई 1 का टपल कैसे असाइन करते हैं? (सभी सही हैं की जाँच करें।)

How do you assign a tuple of length 1 to the variable a? (Check all that are correct.)

A)
B)
C)
D)
Explanation

To create a tuple of length 1, you must include a comma after the value:

  • (A) a = (1,) is correct.
  • (B) a = 1, is not valid.
  • (C) a = [1] creates a list, not a tuple.
  • (D) a = 1 assigns an integer, not a tuple.

So, the correct answer is (A).

Correct Answer: A) a = (1,)


Question: 57 Report Error

जब निम्न कोड चलाया जाता है तो क्या प्रिंट होता है?

What is printed when the following code is run?

tup = ('30', '3', '2', '8')
print(sorted(tup, reverse = True)) 
A)
B)
C)
D)
Explanation

The sorted() function sorts the tuple elements in reverse lexicographical (alphabetical) order.

For the tuple ('30', '3', '2', '8'), the sorted order in reverse is:

['8', '30', '3', '2'].

So, the correct answer is (D).

Correct Answer: C) ['30', '8', '3', '2']


Question: 65 Report Error

readlines () वापस आ जाएगी

readlines () will return

A)
B)
C)
D)

Question: 73 Report Error

NumPy सरणियाँ हो सकती हैं।

NumPy arrays can be

A)
B)
C)
D)

Question: 74 Report Error
Question: 75 Report Error

Python में NumPy का उद्देश्य क्या है?

What is the purpose of NumPy in Python?

A)
B)
C)
D)

Question: 76 Report Error

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

What will be the output?

 def f(x,y,z): 
      return x+ y+ z

 f(2,30,400)
A)
B)
C)
D)
Explanation

The function f(2, 30, 400) adds the values 2 + 30 + 400, which equals 432.

So, the correct answer is (A) 432.

Correct Answer: A) 432


Question: 77 Report Error

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

What will be the output of the following Python code?

from numpy import random
x = random.randint(100) 
print(x)
A)
B)
C)
D)
Explanation

The function random.randint(100) generates a random integer between 0 and 99. So, the output can be any number, like 56, 26, or 40.

Therefore, the correct answer is (D) All of the mentioned above.

Correct Answer: D) All of the mentioned above


Question: 78 Report Error

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

What will be the output of the following python code?

min=(lambda x,y: x if x<y else y)
min(101*99, 102*98)
A)
B)
C)
D)
Explanation

The lambda function compares the two values:

  • 101 * 99 = 9999
  • 102 * 98 = 9996

Since 9996 is smaller, the output will be 9996.

The correct answer is (C) 9996.

Correct Answer: C) 9996


Question: 80 Report Error

NumPy का मतलब है?

NumPy stands for?

A)
B)
C)
D)

Question: 82 Report Error

जब आप निम्नलिखित कोड निष्पादित करते हैं तो क्या त्रुटि होगी?

What error will occur when you execute the following code?

MANGO = APPLE
A)
B)
C)
D)
Explanation

The code:

MANGO = APPLE
  • In this case, APPLE is not defined before it is used, so Python will raise a NameError because it doesn't recognize APPLE as a defined variable.

The correct answer is:

(A) Name error.

Correct Answer: A) Name error


Question: 86 Report Error

निम्नलिखित में से कौन सा कथन असत्य है?

Which among the following statement is false?

A)
B)
C)
D)

Question: 87 Report Error

निम्नलिखित फलन का अध्ययन कीजिए: इस कोड का आउटपुट क्या होगा?

Study the following function: What will be the output of this code?

import math
abs(math.sqrt(36))
A)
B)
C)
D)
Explanation

The square root of 36 is 6.0. The abs() function returns the absolute value, but since 6.0 is already positive, the result remains 6.0.

So, the correct answer is (D) 6.0.

Correct Answer: D) 6.0


Question: 89 Report Error

NumPy में फोरट्रान ऑर्डर क्या है?

What is fortran order in NumPy?

A)
B)
C)
D)

Question: 90 Report Error

NumPy ऐरे की विशेषताएँ क्या हैं?

What are the attributes of NumPy array?

A)
B)
C)
D)

Question: 91 Report Error
Question: 92 Report Error

uint32 डेटा प्रकार की सीमा क्या है?

What is the range of uint32 data type?

A)
B)
C)
D)

Question: 93 Report Error

हम सिस्टम में numPy कैसे स्थापित करते हैं?

How we install numPy in system?

A)
B)
C)
D)

Question: 94 Report Error

NumPy मॉड्यूल कैसे इम्पोर्ट करें?

How to import NumPy module?

A)
B)
C)
D)

Question: 95 Report Error

पायथन उपयोग करता है:

Python uses:

A)
B)
C)
D)

Question: 96 Report Error

NumPy मॉड्यूल कैसे इम्पोर्ट करें?

How to import NumPy module?

A)
B)
C)
D)

Question: 97 Report Error

पायथन उपयोग करता है

Python uses:

A)
B)
C)
D)

Question: 98 Report Error

सीएसवी का मतलब है

csv stands for

A)
B)
C)
D)

Question: 99 Report Error

Python में ____ प्रकार के फंक्शन/मैथेड है।

There are ______ Functions/Method in Python Programming.

A)
B)
C)
D)
Explanation

There are two types of function/method in python programming: pre-defined and user-defined.

Correct Answer: B) 2


Question: 100 Report Error
Related Papers



















































Latest Updates