Python July 2026 Exam Paper
top of page

Python July 2026 Exam Paper

Oct 27
31 min read

Updated: Oct 29

1. निम्नलिखित में से किस प्रॉब्लम में पुनरावृत्ति प्रक्रिया की आवश्यकता होती है ?

a. फैक्टोरियल गणना

b. संख्याओं का योग

c. डेसिमल को बाइनरी में बदलना

d. दो वेरिएबलों का आदान-प्रदान

(A) केवल a, b, c (B) केवल a, c, d (C) केवल b और d (D) केवल a और c


Which of the following problems requires iterative processing ?

a. Factorial computation

b. Summation of numbers

c. Decimal to Binary conversion

d. Exchanging two variables

(A) a, b, c only (B) a, c, d only (C) b and d only (D) a and c only

Ans: A


2. कौन सा पायथन कॉन्स्टेंट ऐसी वैल्यू को दिखाता है जो किसी वैल्यू के न होने का संकेत देती है ?

(A) एम्प्टी स्ट्रिंग (B) फाल्स (C) 0 (D) इनमें से कोई नहीं


Which Python constant represents a value that indicates absence of a value ?

(A) Empty string (B) False (C) 0 (D) None

Ans: D


3. अभिकथन A : फैक्टोरियल गणना में रिकर्शन, आइटरेशन की तुलना में कम मेमोरी-कुशल होता है।

कारण R : रिकर्शन इंटरमीडिएट परिणामों को फंक्शन कॉल स्टैक पर स्टोर करता है।

(A) A गलत, R सही

(B) A सही, R गलत

(C) A और R सही, R, A का सही स्पष्टीकरण नहीं है

(D) A और R सही, R, A की व्याख्या करता है


Assertion A : In factorial computation, recursion is less memory-efficient than iteration.

Reason R : Recursion stores intermediate results on the function call stack.

(A) A false, R true

(B) A true, R false

(C) A and R true, R is not correct explanation of A

(D) A and R true, R explains A

Ans: D


4. फ्लोचार्ट में निर्णय लेने के लिए प्रयुक्त प्रतीक है :

(A) आयत (B) समांतर चतुर्भुज (C) डायमंड (D) अंडाकार


The symbol used for decision-making in a flowchart is :

(A) Rectangle (B) Parallelogram (C) Diamond (D) Oval

Ans: C

5. नीचे दिए गए पायथन कोड पर विचार करें। y का अंतिम मान क्या होगा ?

Consider following Python code. What will be the final value of y ?

x, y = 5, 0

while x > 0:

x -= 1

if x == 2: continue

y += x

(A) 8 (B) 9 (C) 10 (D) 11

Ans: A


6. पायथन फंक्शन्स से जुड़े इन स्टेटमेंट्स को True (T) या False (F) के तौर पर मार्क करें :

1. eval() फंक्शन एक स्ट्रिंग को पायथन कोड में बदलता है और उसे एक्जीक्यूट करता है।

2. strip() स्ट्रिंग के सिर्फ बाएँ ओर से कैरेक्टर्स को हटाता है।

3. isdigit() True रिटर्न करता है अगर सभी कैरेक्टर्स डिजिट्स हों।

4. random() 0 और 1 के बीच एक इंटीजर रिटर्न करता है।


Mark the following statements pertaining to Python functions as True (T) or False (F) :

1. eval() function converts a string into Python code and executes it.

2. strip() removes characters only from the left side of a string.

3. isdigit() returns True if all characters are digits.

4. random() returns an integer between 0 and 1.


(A) 1-T, 2-T, 3-T, 4-T

(B) 1-F, 2-F, 3-T, 4-F

(C) 1-T, 2-F, 3-F, 4-T

(D) 1-T, 2-F, 3-T, 4-F

Ans: D


7. जब किसी मौजूदा फ़ाइल को "w+" मोड में खोला जाता है, तो क्या होता है ?

(A) फ़ाइल को बिना ट्रंकेशन के केवल रीडिंग के लिए खोला जाता है

(B) फ़ाइल को केवल राइटिंग के लिए खोला जाता है और डेटा को अपेंड किया जाता है

(C) फ़ाइल को रीड और राइट करने के लिए खोला जाता है, और मौजूदा कंटेंट को इरेज़ कर दिया जाता है

(D) फ़ाइल को अपेंड करने और रीडिंग के लिए खोला जाता है


What happens when an existing file is opened in "w+" mode ?

(A) File is opened for reading only without truncation

(B) File is opened for writing only and data is appended

(C) File is opened for reading and writing, and existing content is erased

(D) File is opened for appending and reading

Ans: C

8. अगर कोई वेरिएबल लोकल, एनक्लोजिंग या ग्लोबल स्कोप में नहीं मिलता है, तो पायथन ____ में ढूंढता है।

(A) सिर्फ लोकल स्कोप में दोबारा

(B) एनक्लोजिंग स्कोप में दोबारा

(C) बिल्ट-इन स्कोप में

(D) मॉड्यूल नेमस्पेस में


If a variable is not found in Local, Enclosing, or Global scopes, Python searches :

(A) Only the Local scope again

(B) The Enclosing scope again

(C) The Built-in scope

(D) The module namespace

Ans: C

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

a = [1, 2, 3]

b = a

a.append(4)

print(b)

(A) कोई नहीं (B)[1,2,3] (C) एरर (D)[1,2,3,4]

Ans: D


What will be the output of the code below?

a = [1, 2, 3]

b = a

a.append(4)

print(b)

(A) None (B)[1,2,3 (C) Error (D)[1,2,3,4]

Ans:D


10. संख्या 25 को डेसिमल से बाइनरी में बदलने के लिए, कौन-सा बाइनरी निरूपण सही है?

For decimal-to-binary conversion of number 25, which binary representation is correct?

(A) 11001 (B) 10011 (C) 10101 (D) 11100

Ans: A


11. पायथन में, एक डायनामिक लिस्ट में n एलिमेंट्स को अपेंड करने की स्पेस कॉम्प्लेक्सिटी क्या है?

In Python, what is the space complexity of appending n elements into a dynamic list?

(A) O(n log n) (B) O(n) (C) O(1) (D) O(log n)

Ans: B


12. पायथन में, सॉर्ट किए गए ऐरे के लिए कौन सा सर्चिंग एल्गोरिदम उपयुक्त है?

(A) लीनियर सर्च (B) हैश सर्च (C) जंप सर्च (D) बाइनरी सर्च


In Python, which searching algorithm is suitable for sorted arrays?

(A) Linear Search (B) Hash Search (C) Jump Search (D) Binary Search

Ans: D


13. पायथन में एलिमेंट एक्सेस के लिए इनमें से किसकी औसत-केस टाइम कॉम्प्लेक्सिटी O(1) है?

(A) डिक्शनरी (B) ट्यूपल (C) सेट (D) लिस्ट


Which of the following has the average-case time complexity of O(1) for element access in Python?

(A) Dictionary (B) Tuple (C) Set (D) List

Ans: A

14. नीचे दिए गए पायथन फ़ंक्शन पर विचार करें :

def fact(n):

if n == 0:

return 1

else:

return n * fact(n-1)

इनमें से कौन सा सही है ?

1. n >= 0 के लिए, फ़ंक्शन हमेशा समाप्त होता है।

2. बहुत बड़े n के लिए, रिकर्शन डेप्थ एरर हो सकता है।

3. नेगेटिव n के लिए, फ़ंक्शन इनफिनिट रिकर्शन में चला जाता है।

4. इसके बराबर का आइटरेटिव सॉल्यूशन रिकर्शन डेप्थ की समस्या से बचाता है।

(A) केवल 1, 2, 3 (B) केवल 2, 3, 4 (C) केवल 1, 4 (D) 1, 2, 3, 4


Consider the following Python function :

def fact(n):

if n == 0:

return 1

else:

return n * fact(n-1)

Which of the following is correct ?

1. The function always terminates for n >= 0.

2. For very large n, recursion depth error may occur.

3. For negative n, function goes into infinite recursion.

4. Equivalent iterative solution avoids recursion depth issue.

(A) 1, 2, 3 only (B) 2, 3, 4 only (C) 1, 4 only (D) 1, 2, 3, 4

Ans: D


15. नीचे दिए गए प्रश्न में एक अभिकथन A और एक कारण R शामिल है। आपको दिए गए विकल्पों में से सही विकल्प चुनना है।

अभिकथन A : फ्लोचार्ट किसी एल्गोरिदम के लॉजिक को विजुअलाइज करने में मदद करते हैं।

कारण R : फ्लोचार्ट प्रोग्रामों के मशीन-निष्पादन योग्य निरूपण होते हैं।

(A) A और R सही हैं, R सही स्पष्टीकरण है

(B) A और R सही हैं, R सही स्पष्टीकरण नहीं है

(C) A सही है, R गलत है

(D) A गलत है, R सही है


The following question consists of an Assertion A and a Reason R. You need to choose the correct option from the given options.

Assertion A : Flowcharts help visualize the logic of an algorithm.

Reason R : Flowcharts are machine-executable representations of programs.

(A) A and R true, R correct explanation

(B) A and R true, R not correct explanation

(C) A true, R false

(D) A false, R true

Ans: C

16. अगर कोई वेरिएबल नेम लोकल, एनक्लोजिंग और ग्लोबल स्कोप में मौजूद हो, तो किसे चुना जाता है ?

(A) ग्लोबल (B) एनक्लोजिंग (C) बिल्ट-इन (D) लोकल


If a variable name exists in local, enclosing, and global scopes, which one is chosen ?

(A) Global (B) Enclosing (C) Built-in (D) Local

Ans: D


17. एक प्रोग्रामर एक ऐसा एल्गोरिदम बनाना चाहता है जो यह जांच सके कि कोई संख्या अभाज्य है या नहीं। वे इसे 2 से n - 1 तक सभी पूर्णांकों से संख्या को विभाजित करके लागू करते हैं। n = 9973 के लिए, प्रोग्राम को चलने में बहुत समय लगता है। कौन-सा ऑप्टिमाइजेशन लागू किया जाना चाहिए ?

(A) केवल sqrt(n) तक विभाजित करें।

(B) केवल विषम संख्याओं से विभाजित करें।

(C) रिकर्सिव फैक्टोरियल-आधारित जांच का उपयोग करें।

(D) भाजकों पर बाइनरी सर्च का उपयोग करें।


A programmer wants to create an algorithm that checks if a number is prime. They implement it by dividing the number by all integers from 2 to n - 1. For n = 9973, the program takes a long time to run. Which optimization should be applied ?

(A) Divide only up to sqrt(n).

(B) Divide only by odd numbers.

(C) Use a recursive factorial-based check.

(D) Use binary search on divisors.

Ans: A


18. पायथन में फॉर लूप के बारे में इनमें से कौन-से कथन सही हैं ?

1. ये लिस्ट, स्ट्रिंग और रेंज पर इटरेट कर सकते हैं।

2. इनमें हमेशा एक एल्स शामिल होना चाहिए।

3. ब्रेक अगले इटरेशन पर चला जाता है।

4. एल्स तभी चलता है जब लूप ब्रेक से खत्म न हो।

(A) केवल 1 और 2 (B) केवल 3 और 4 (C) केवल 1 और 4 (D) केवल 2 और 3


Which of the following statements are true about for loops in Python ?

1. They can iterate over lists, strings, and ranges.

2. They must always include an else.

3. break skips to the next iteration.

4. else executes only if the loop is not terminated by break.

(A) 1 and 2 only (B) 3 and 4 only (C) 1 and 4 only (D) 2 and 3 only

Ans: C

19. पायथन में रिकर्शन के बारे में कौन से कथन सही हैं?

1. रिकर्शन की गहराई डिफ़ॉल्ट रूप से सीमित होती है।

2. पायथन द्वारा टेल रिकर्शन को अपने आप ऑप्टिमाइज़ किया जाता है।

3. http://sys.setrecursionlimit() रिकर्शन की गहराई को बढ़ा सकता है।

4. रिकर्सिव फंक्शन्स को उनके जैसे काम करने वाले इटरेटिव फंक्शंस से बदला जा सकता है।

(A) 1, 2, 3, 4 (B) केवल 1, 2, 3 (C) केवल 1, 3, 4 (D) केवल 2, 4


Which statements about recursion in Python are true?

1. Recursion depth is limited by default.

2. Tail recursion is optimized by Python automatically.

3. http://sys.setrecursionlimit() can increase recursion depth.

4. Recursive functions can be replaced by iterative equivalents.

(A) 1, 2, 3, 4 (B) 1, 2, 3 only (C) 1, 3, 4 only (D) 2, 4 only

Ans: C


20. इनमें से कौन सा कथन गलत है?

(A) मॉड्यूल एक ऐसी फ़ाइल है जिसमें पायथन डेफिनिशन और स्टेटमेंट होते हैं।

(B) जब किसी मॉड्यूल को इम्पोर्ट किया जाता है, तो pycache में एक कम्पाइल की गई .pyc फ़ाइल बन सकती है।

(C) हर मॉड्यूल का अपना ग्लोबल नेमस्पेस होता है।

(D) किसी मॉड्यूल के अंदर ग्लोबल के तौर पर घोषित वेरिएबल, उसे इम्पोर्ट करने वाले दूसरे मॉड्यूल में अपने आप ग्लोबल बन जाता है।


Which of the following statements is FALSE?

(A) A module is a file containing Python definitions and statements.

(B) When a module is imported, a compiled .pyc file may be created in pycache.

(C) Each module has its own global namespace.

(D) A variable declared global inside a module automatically becomes global in another module that imports it.

Ans: D


21. पायथन से जुड़े इन वाक्यों को सही (T) या गलत (F) के तौर पर चिह्नित करें:

1. tell() फंक्शन बाइट्स में फ़ाइल पॉइंटर की मौजूदा पॉज़िशन बताता है।

2. seek(0) पॉइंटर को फ़ाइल के अंत में ले जाता है।

3. अगर फ़ाइल को "w" मोड में खोला जाए, तो write() फ़ाइल के कंटेंट को ओवरराइट कर देता है।

4. "a" मोड में खोली गई फ़ाइलें मौजूदा कंटेंट को ट्रंकेट कर देती हैं।


Mark following statements related to Python as True (T) or False (F):

1. tell() function returns the current file pointer position in bytes.

2. seek(0) moves the pointer to the end of the file.

3. write() overwrites the content of a file if opened in "w" mode.

4. Files opened in "a" mode truncate existing content.

(A) 1-T, 2-T, 3-T, 4-T (B) 1-F, 2-T, 3-T, 4-F

(C) 1-T, 2-F, 3-T, 4-F (D) 1-T, 2-F, 3-F, 4-T

Ans: C

22. फ़ाइल पॉइंटर की वर्तमान स्थिति को वापस पाने के लिए निम्नलिखित में से किस विधि का उपयोग किया जाता है?

Which of the following methods is used to return the current position of a file pointer?

(A) pointer() (B) tell() (C) seek() (D) position()

Ans: B

23. अभिकथन A : a = b = c = 5 तीनों वेरिएबल्स को 5 की वैल्यू देता है।

कारण R : Python कई असाइनमेंट्स को बाएँ से दाएँ इवैल्यूएट करता है।

(A) A और R दोनों सही हैं, R, A की सही व्याख्या करता है

(B) A और R दोनों सही हैं, R, A की सही व्याख्या नहीं करता है

(C) A सही है, R गलत है

(D) A गलत है, R सही है


Assertion A : a = b = c = 5 assigns the value 5 to all three variables.

Reason R : Python evaluates multiple assignments from left to right.

(A) A and R both true, R explains A

(B) A and R both true, R does not explain A

(C) A true, R false

(D) A false, R true

Ans: C


24. प्रोग्राम डेवलपमेंट का कौन-सा चरण लॉजिकल गलतियों को हटाकर उसकी सही होने की पुष्टि करता है?

(A) डॉक्यूमेंटेशन (B) कम्पाइलेशन (C) लिंकिंग (D) डीबगिंग

Which stage of program development ensures correctness by removing logical errors?

(A) Documentation (B) Compilation (C) Linking (D) Debugging

Ans: D


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

What is the output of the following code?

x = "Python"

print(x[1:4])

(A) yth (B) Pyt (C) hon (D) tho

Ans: A


26. निम्नलिखित में से कौन-से फ्लोचार्ट डिज़ाइन के मुख्य सिद्धांत हैं?

a. मानकीकृत प्रतीकों का उपयोग

b. स्पष्ट रूप से परिभाषित शुरुआत और अंत

c. किसी भी एल्गोरिदम में लूप से बचना

d. ऊपर से नीचे की ओर लॉजिकल फ्लो

(A) केवल a और b (B) केवल c और d

(C) केवल a, b और d (D) केवल a, b और c


Which of the following are key principles of flowchart design?

a. Use of standardized symbols

b. Clearly defined start and end

c. Avoid loops in any algorithm

d. Logical flow from top to bottom

(A) a and b only (B) c and d only

(C) a, b, and d only (D) a, b, and c only

Ans: C

27. इनमें से कौन सा कथन गलत है?

(A) मॉड्यूल नेमस्पेस केवल एक बार, उसके पहली बार इम्पोर्ट होने के समय बनाया जाता है।

(B) किसी मॉड्यूल को दोबारा इम्पोर्ट करने पर उसका कोड फिर से चलता है।

(C) http://importlib.reload() मॉड्यूल कोड को दोबारा चलाने के लिए फोर्स कर सकता है।

(D) एल.ई.जी.बी. नियम वेरिएबल लुकअप और फ़ंक्शन लुकअप, दोनों पर लागू होता है।


Which of the following statements is FALSE?

(A) A module namespace is created only once, at the time of its first import.

(B) Re-importing a module executes its code again.

(C) http://importlib.reload() can force re-execution of module code.

(D) The LEGB rule applies both to variable lookup and to function lookup.

Ans: B


28. अभिकथन A : पायथन में स्ट्रिंग्स इम्यूटेबल होती हैं।

कारण R : एक बार स्ट्रिंग बन जाने के बाद, उसके कैरेक्टर्स को सीधे बदला नहीं जा सकता।

(A) A गलत है, R सही है

(B) A सही है, R सही है, लेकिन R, A की व्याख्या नहीं करता है

(C) A सही है, R गलत है

(D) A सही है, R सही है, और R, A की व्याख्या करता है


Assertion A : Strings in Python are immutable.

Reason R : Once a string is created, its characters cannot be modified directly.

(A) A is false, R is true

(B) A is true, R is true, but R does not explain A

(C) A is true, R is false

(D) A is true, R is true, and R explains A

Ans: D


29. फास्ट फोरियर ट्रांसफॉर्म की गणना करने के लिए किस नंपी फ़ंक्शन का उपयोग किया जाता है?

Which NumPy function is used to compute the Fast Fourier Transform?

(A) http://np.fft.fft() (B) http://np.fft() (C) http://np.transform() (D) http://np.fourier()

Ans: A


30. पायथन फ़ंक्शंस के बारे में इनमें से कौन-सी बात सही नहीं है?

(A) फ़ंक्शंस को आर्ग्युमेंट्स के तौर पर पास नहीं किया जा सकता

(B) फ़ंक्शंस को नेस्ट किया जा सकता है

(C) फ़ंक्शंस, फ़ंक्शंस को रिटर्न कर सकते हैं

(D) फ़ंक्शंस फ़र्स्ट-क्लास ऑब्जेक्ट्स होते हैं


Which of the following is not true about Python functions?

(A) Functions cannot be passed as arguments

(B) Functions can be nested

(C) Functions can return functions

(D) Functions are first-class objects

Ans: A

31. पायथन में seek() फ़ंक्शन के बारे में इनमें से कौन सी बातें सही हैं ?

1. seek(0) पॉइंटर को फ़ाइल की शुरुआत में सेट करता है

2. seek(5) पॉइंटर को शुरुआत से 5वें कैरेक्टर पर सेट करता है

3. seek(-1) टेक्स्ट मोड में पीछे की ओर जाने के लिए मान्य है

4. seek(0, 2) पॉइंटर को फ़ाइल के अंत में ले जाता है

(A) केवल 1, 2 (B) केवल 3, 4 (C) केवल 1, 2, 4 (D) केवल 2, 3, 4


Which of the following are true about seek() function in Python ?

1. seek(0) sets pointer to file beginning

2. seek(5) sets pointer to 5th character from beginning

3. seek(-1) is valid for moving backwards in text mode

4. seek(0, 2) moves pointer to the end of the file

(A) 1, 2 only (B) 3, 4 only (C) 1, 2, 4 only (D) 2, 3, 4 only

Ans: C


32. निम्नलिखित में से पायथन मुख्य रूप से किस प्रोग्रामिंग पैराडाइम को सपोर्ट करता है ?

(A) प्रोसीजरल, ऑब्जेक्ट-ओरिएंटेड, फंक्शनल

(B) केवल मशीन-लेवल

(C) केवल स्ट्रक्चर्ड

(D) केवल डिक्लेरेटिव


Which among the following programming paradigms does Python primarily support ?

(A) Procedural, Object-Oriented, Functional

(B) Machine-level only

(C) Structured only

(D) Declarative only

Ans: A


33. पायथन का कौन-सा बिल्ट-इन डेटा टाइप यूनिक और अनऑर्डर्ड, दोनों तरह के एलिमेंट्स को स्टोर कर सकता है ?

(A) ट्यूपल (B) सेट (C) डिक्शनरी (D) लिस्ट


Which Python built-in data type can store both unique and unordered elements ?

(A) Tuple (B) Set (C) Dictionary (D) List

Ans: B


34. पायथन में इंटीजर लिटरल्स का डिफ़ॉल्ट बेस ____ है।

(A) डेसिमल (B) हेक्साडेसिमल (C) ऑक्टल (D) बाइनरी


The default base of integer literals in Python is :

(A) Decimal (B) Hexadecimal (C) Octal (D) Binary

Ans: A

35. फ़ाइल मोड को उनके सही विवरण से मिलाएँ :

फाइल मोड विवरण

a. "r" 1. रिड एवं राइट (फाइल ट्रंकेट करना)

b. "w+" 2. फाइल में कंटेंट अपेंड करना

c. "a" 3. डिफ़ॉल्ट रीड मोड

d. "r+" 4. बिना ट्रंकेट किए रीड और राइट करना

Match the file modes with their correct description :

File Modes Description

a. "r" 1. Read & Write (truncate file)

b. "w+" 2. Append content to file

c. "a" 3. Default read mode

d. "r+" 4. Read & Write without truncating

(A) a-2, b-3, c-1, d-4

(B) a-3, b-1, c-2, d-4

(C) a-3, b-4, c-1, d-2

(D) a-4, b-1, c-2, d-3

Ans: C


36. कौन सा इम्पोर्ट स्टेटमेंट मॉड्यूल के नाम का उपयोग करके मॉड्यूल के मेंबर्स को एक्सेस करने की सुविधा देता है ?

Which import statement allows accessing module members using the module name ?

(A) from module import _

(B) import module

(C) from module import name

(D) import _ from module

Ans: B


37. पायथन में कौन सा डेटा टाइप इम्यूटेबिलिटी सुनिश्चित करता है और डिक्शनरी कीज़ के रूप में इस्तेमाल की अनुमति देता है ?

(A) डिक्शनरी (B) सेट (C) ट्यूपल (D) लिस्ट


Which data type in Python ensures immutability and allows use as dictionary keys ?

(A) Dictionary (B) Set (C) Tuple (D) List

Ans: C


38. पायथन में एसर्ट के बारे में कौन से कथन सही हैं ?

1. अगर कंडीशन गलत होती है, तो यह एसर्शनएरर देता है।

2. इसका इस्तेमाल इनफिनिट लूप बनाने के लिए किया जाता है।

3. इसमें एक ऑप्शनल एरर मैसेज शामिल हो सकता है।

4. जब पायथन को -O (ऑप्टिमाइज्ड फ्लैग) के साथ चलाया जाता है, तो इसे इग्नोर कर दिया जाता है।

(A) केवल 1, 2, 3 (B) केवल 2, 3, 4 (C) केवल 1, 3, 4 (D) 1, 2, 3, 4


Which statements are true about assert in Python ?

1. It raises AssertionError if the condition is false.

2. It is used to create infinite loops.

3. It can include an optional error message.

4. It is ignored when Python is run with -O (optimize flag).

(A) 1, 2, 3 only (B) 2, 3, 4 only (C) 1, 3, 4 only (D) 1, 2, 3, 4

Ans: C

39. क्या प्रिंट होगा ?

What will be printed ?

x = [1, 2, 3]

y = np.asarray(x)

x[0] = 100

print(y[0])

(A) Error (B) 100 (C) 1 (D) 1000

Ans:C


40. एल्गोरिदम डिज़ाइन में, किसी संख्या n के फैक्टोरियल को पुनरावर्ती रूप से ____ के रूप में परिभाषित किया जा सकता है।

In algorithm design, the factorial of a number n can be defined recursively as :

(A) n! = n x (n - 1)! (B) n! = n + (n - 1)!

(C) n! = n + (n - 1)! (D) n! = (n - 1) x (n - 2)!

Ans: A


41. इन-बिल्ट पायथन डेटाटाइप्स को उनके उदाहरणों से मिलाएँ :

डाटाटाइप उदाहरण

a. इंटीजर 1. {'a','b','c'}

b. स्ट्रिंग 2. 3+4j

c. कॉम्प्लेक्स नंबर 3. 2025

d. सेट 4. "OpenAI"

Match the built-in Python datatypes with their examples :

Datatype Example

a. Integer 1. {'a','b','c'}

b. String 2. 3+4j

c. Complex Number 3. 2025

d. Set 4. "OpenAI"

(A) a-1, b-2, c-3, d-4

(B) a-3, b-1, c-2, d-4

(C) a-3, b-4, c-2, d-1

(D) a-4, b-1, c-2, d-3

Ans: C


42. यूजर से स्ट्रिंग के रूप में इनपुट लेने के लिए किस फंक्शन का इस्तेमाल किया जाता है ?

Which function is used to accept input from the user as a string ?

(A) eval() (B) raw_input() (in Python 3)

(C) str() (D) input()

Ans: D

43. अभिकथन A : पायथन में एक फ़ंक्शन कई वैल्यूज़ रिटर्न कर सकता है।

कारण R : पायथन कई रिटर्न वैल्यूज़ को अपने-आप एक लिस्ट में पैक कर देता है।

(A) A सही है, R सही है, और R सही स्पष्टीकरण है

(B) A सही है, R सही है, लेकिन R सही स्पष्टीकरण नहीं है

(C) A सही है, R गलत है

(D) A गलत है, R सही है


Assertion A : A function in Python can return multiple values.

Reason R : Python implicitly packs multiple return values into a list.

(A) A is true, R is true, and R is correct explanation

(B) A is true, R is true, but R is not correct explanation

(C) A is true, R is false

(D) A is false, R is true

Ans: C


44. पायथन कीवर्ड्स को उनके स्कोप के उपयोग से मिलाएँ :

कीवर्ड्स स्कोप

a. global 1. एनक्लोजिंग नॉन-ग्लोबल वेरिएबल्स को एक्सेस/मॉडिफाई करता है

b. nonlocal 2. सभी फंक्शन्स के बाहर घोषित वेरिएबल्स को एक्सेस/मॉडिफाई करता है

c. locals() 3. करेंट फंक्शन स्कोप की डिक्शनरी रिटर्न करता है

d. globals() 4. करेंट ग्लोबल स्कोप की डिक्शनरी रिटर्न करता है

Match Python keywords with their scope usage :

Keywords Scope

a. global 1. Access/modifies enclosing non-global variables

b. nonlocal 2. Access/modifies variables declared outside all functions

c. locals() 3. Returns dictionary of current function scope

d. globals() 4. Returns dictionary of current global scope

(A) a-2, b-1, c-3, d-4

(B) a-1, b-2, c-3, d-4

(C) a-2, b-3, c-1, d-4

(D) a-4, b-3, c-1, d-2

Ans: A


45. http://np.asarray() क्या करता है ?

(A) हमेशा डेटा की एक कॉपी बनाता है

(B) अगर संभव हो तो बिना कॉपी किए इनपुट को ऐरे में बदलता है

(C) ऐरे को लिस्ट में बदलता है

(D) एक खाली ऐरे बनाता है


What does http://np.asarray() do ?

(A) Always creates a copy of data

(B) Converts input to an array without copying if possible

(C) Converts array to list

(D) Creates an empty array

Ans: B

46. ट्यूपल पर लीनियर सर्च के बारे में कौन सा कथन सही है ?

(A) ट्यूपल को सर्च नहीं किया जा सकता

(B) लीनियर सर्च केवल लिस्ट पर काम करता है

(C) लीनियर सर्च लिस्ट और ट्यूपल दोनों पर एक ही तरह से काम करता है

(D) ट्यूपल को लिस्ट में बदलना ज़रूरी है


Which statement about linear search on a tuple is TRUE ?

(A) Tuples cannot be searched

(B) Linear search works only on lists

(C) Linear search works the same on lists and tuples

(D) Tuples must be converted to lists

Ans: C


47. फ्लोचार्ट के प्रतीकों को उनके अर्थ से मिलाएँ :

प्रतीक अर्थ

1. अंडाकार a. इनपुट/आउटपुट

2. समांतर चतुर्भुज b. डिसीजन

3. डायमंड c. स्टार्ट/एंड

4. आयत d. प्रोसेस

Match the flowchart symbols with their meaning :

Symbol Meaning

1. Oval a. Input/Output

2. Parallelogram b. Decision

3. Diamond c. Start/End

4. Rectangle d. Process

(A) 1-a, 2-c, 3-b, 4-d

(B) 1-c, 2-a, 3-b, 4-d

(C) 1-c, 2-d, 3-a, 4-b

(D) 1-b, 2-a, 3-d, 4-c

Ans: C


48. नंपी डीटाइप के बारे में इनमें से कौन सा कथन गलत है ?

(A) डीटाइप यह तय करता है कि ऐरे में किस तरह के एलिमेंट्स स्टोर होंगे।

(B) ऐरे बनाते समय डीटाइप को साफ़ तौर पर बताया जा सकता है।

(C) एक बार ऐरे बन जाने के बाद डीटाइप को बदला नहीं जा सकता।

(D) डीटाइप ऐरे एलिमेंट्स के मेमोरी साइज़ पर असर डालता है।


Which of the following statements is FALSE about NumPy dtype ?

(A) dtype determines the kind of elements stored in array.

(B) dtype can be explicitly specified during array creation.

(C) dtype cannot be changed once array is created.

(D) dtype affects the memory size of array elements.

Ans: C

49. एक छात्र निम्नलिखित पायथन कोड लिखता है। आउटपुट क्या होगा ?

A student writes the following Python code. What will be the output ?

x = 10

y = 10.0

print(x == y, x is y)

(A) True True (B) True False (C) False True (D) False False

Ans: B


50. जब कोई सबक्लास अपने सुपरक्लास के किसी मेथड को रीडिफाइन करता है, तो ओ.ओ.पी. का कौन सा सिद्धांत सबसे अच्छी तरह प्रदर्शित होता है ?

(A) पॉलीमॉर्फिज्म (B) इनहेरिटेंस (C) एनकैप्सुलेशन (D) एब्स्ट्रैक्शन


Which principle of OOP is best demonstrated when a subclass redefines a method from its superclass ?

(A) Polymorphism (B) Inheritance (C) Encapsulation (D) Abstraction

Ans: A


51. नीचे दिए गए कथनों को सही (T) या गलत (F) के रूप में चिह्नित करें।

1. हाई-लेवल प्रोग्रामिंग भाषाएँ सीधे सी.पी.यू. द्वारा निष्पादित की जाती हैं।

2. कम्पाइलेशन, प्रोग्राम के निष्पादन से पहले पूरे प्रोग्राम को मशीन कोड में बदल देता है।

3. टेस्टिंग यह सुनिश्चित करती है कि प्रोग्राम उपयोगकर्ता की आवश्यकताओं को पूरा करता है।

4. डीबगिंग, त्रुटियों का पता लगाने और उन्हें ठीक करने की प्रक्रिया है।


Mark the following statements as True (T) or False (F).

1. High-level programming languages are directly executed by the CPU.

2. Compilation translates the entire program into machine code before execution.

3. Testing ensures that the program meets user requirements.

4. Debugging is the process of locating and correcting errors.

(A) 1-F, 2-T, 3-T, 4-F

(B) 1-F, 2-T, 3-T, 4-T

(C) 1-T, 2-F, 3-T, 4-T

(D) 1-T, 2-T, 3-F, 4-T

Ans: B


52. कौन से एल्गोरिदम निर्णय-आधारित प्रोसेसिंग के उदाहरण हैं ?

a. एक ऐरे में सबसे बड़ी संख्या ज्ञात करना

b. मुद्रा का रूपांतरण

c. अभाज्य संख्या की जाँच

d. दो वेरिएबल्स को आपस में बदलना

(A) केवल a, d (B) केवल b, c (C) केवल a, c (D) केवल b, d


Which algorithms are examples of decision-based processing ?

a. Find the largest number in an array

b. Conversion of currency

c. Prime number testing

d. Exchanging two variables

(A) a, d only (B) b, c only (C) a, c only (D) b, d only

Ans: C

53. पायथन में स्ट्रिंग फंक्शन को उसके उद्देश्य से मिलाएँ :

फंक्शन उद्देश्य

a. find() 1. सेपरेटर के आस-पास स्ट्रिंग को 3 हिस्सों में बाँटता है

b. title() 2. सबस्ट्रिंग का इंडेक्स ढूँढता है

c. replace() 3. हर शब्द के पहले अक्षर को अपरकेस में बदलता है

d. partition() 4. सबस्ट्रिंग की जगह दूसरी चीज़ लगाता है

Match the string function in Python with its purpose :

Function Purpose

a. find() 1. Splits string into 3 parts around a separator

b. title() 2. Finds the index of substring

c. replace() 3. Converts first character of each word to uppercase

d. partition() 4. Substitutes occurrences of substring

(A) a-2, b-3, c-4, d-1 (B) a-3, b-2, c-1, d-4

(C) a-4, b-1, c-2, d-3 (D) a-1, b-2, c-3, d-4

Ans: D


54. अगर arr = np.array(1,2,3,4) है, तो arr.shape क्या रिटर्न करेगा?

If arr = np.array(1,2,3,4), what will arr.shape return?

(A) 4 (B) (4,1) (C) (1,4) (D) (4,)

Ans: D


55. निम्नलिखित में से कौन एक प्रोग्राम की पठनीयता और रखरखाव सुनिश्चित करता है?

(A) डॉक्यूमेंटेशन (B) डीबगिंग (C) एल्गोरिदम (D) फ्लोचार्ट


Which of the following ensures readability and maintenance of a program?

(A) Documentation (B) Debugging (C) Algorithm (D) Flowchart

Ans: A


56. नीचे दिए गए वाक्यों को सही (T) या गलत (F) के रूप में चिह्नित करें :

1. पायथन में, x // y हमेशा एक फ्लोट रिटर्न करता है।

2. x ^ y लॉजिकल XOR ऑपरेशन करता है।

3. व्हाइल लूप में एल्स ब्लॉक तभी चलता है जब लूप बिना ब्रेक के पूरा हो जाता है।

4. कंटिन्यू स्टेटमेंट लूप को तुरंत खत्म कर देता है।


Mark the following statements as True (T) or False (F) :

1. In Python, x // y always returns a float.

2. x ^ y performs logical XOR.

3. The else block in while executes only if the loop completes without break.

4. continue statement ends the loop immediately.

(A) 1 - T, 2 - F, 3 - T, 4 - F

(B) 1 - F, 2 - T, 3 - F, 4 - F

(C) 1 - T, 2 - F, 3 - T, 4 - T

(D) 1 - F, 2 - F, 3 - T, 4 - F

Ans: D

57. निम्नलिखित में से कौन-से मान्य पायथन स्ट्रिंग ऑपरेशन हैं?

1. "AI" _ 3 → "AIAIAI"

2. "AI" - "I" → "A"

3. "AI" + "ML" → "AIML"

4. "AI" → "I"

(A) केवल 1, 2, 3 (B) केवल 1, 3, 4 (C) केवल 2, 3, 4 (D) केवल 1 और 4[1]


Which of the following are valid Python string operations?

1. "AI" _ 3 → "AIAIAI"

2. "AI" - "I" → "A"

3. "AI" + "ML" → "AIML"

4. "AI" → "I"

(A) 1, 2, 3 only (B) 1, 3, 4 only (C) 2, 3, 4 only (D) 1 and 4 only

Ans: B


58. अभिकथन A : पायथन में लिस्ट म्यूटेबल होती हैं, जबकि ट्यूपल्स इम्यूटेबल होते हैं।

कारण R : ट्यूपल्स कंटीगुअस मेमोरी में स्टोर होते हैं, जबकि लिस्ट लिंक्ड-लिस्ट के तरीके से स्टोर होती हैं।

(A) A गलत, R सही

(B) A सही, R गलत

(C) A और R दोनों सही, R सही स्पष्टीकरण नहीं है

(D) A और R दोनों सही, R सही स्पष्टीकरण है


Assertion A : Lists in Python are mutable, while tuples are immutable.

Reason R : Tuples are stored in contiguous memory, while lists are stored in linked-list fashion.

(A) A false, R true

(B) A true, R false

(C) A and R both true, R is NOT correct explanation

(D) A and R both true, R is correct explanation

Ans: B

59. निम्नलिखित में से कौन सा तरीका पायथन लिस्ट की शैलो कॉपी रिटर्न करता है?

Which of the following methods returns a shallow copy of a Python list?

(A) list.clone() (B) deepcopy() (C) clone() (D) list.copy()

Ans: D


60. इनमें से कौन सा कथन गलत है?

(A) ग्लोबल कीवर्ड मौजूदा फ़ंक्शन के बाहर घोषित वेरिएबल में बदलाव करने की सुविधा देता है।

(B) नॉनलोकल कीवर्ड का उपयोग ऐसे वेरिएबल में बदलाव करने के लिए किया जा सकता है जो एनक्लोजिंग स्कोप में हों, लेकिन ग्लोबल स्कोप में न हों।

(C) नेस्टेड फ़ंक्शन के अंदर ग्लोबल का उपयोग करने पर हमेशा सबसे करीबी एनक्लोजिंग फ़ंक्शन स्कोप पर असर पड़ेगा।

(D) abs() जैसे बिल्ट-इन फ़ंक्शन को ग्लोबल स्कोप में फिर से परिभाषित करके ओवरराइड किया जा सकता है।


Which of the following statements is FALSE?

(A) The global keyword allows modification of a variable declared outside the current function.

(B) The nonlocal keyword can be used to modify variables in enclosing but non-global scopes.

(C) Using global inside nested functions will always affect the nearest enclosing function scope.

(D) Built-in functions like abs() can be overridden by redefining them in global scope.

Ans: C

61. अभिकथन A : यदि दो मॉड्यूल एक ही नाम वाले वेरिएबल को परिभाषित करते हैं, तो एक साथ इम्पोर्ट किए जाने पर उनमें कोई टकराव नहीं होता है।

कारण R : प्रत्येक मॉड्यूल अपना अलग ग्लोबल नेमस्पेस बनाए रखता है।

(A) A और R दोनों सही हैं, और R सही व्याख्या है

(B) A और R दोनों सही हैं, लेकिन R सही व्याख्या नहीं है

(C) A सही है, R गलत है

(D) A गलत है, R सही है


Assertion A : If two modules define a variable with the same name, they do not conflict when imported together.

Reason R : Each module maintains its own separate global namespace.

(A) Both A and R are true, and R is correct explanation

(B) Both A and R are true, but R is not correct explanation

(C) A is true, R is false

(D) A is false, R is true

Ans: A


62. पायथन के open() फ़ंक्शन में डिफ़ॉल्ट फ़ाइल ओपनिंग मोड क्या है?

What is the default file opening mode in Python's open() function?

(A) w (B) a (C) rb (D) r

Ans: D


63. नीचे दिए गए कोड का आउटपुट ____ होगा।

The output of the following code will be :

x = [1, 2, 3]

y = {2, 3, 4}

print(x ^ y)


(A) {1, 4} (B) {1, 2, 3, 4} (C) {2, 3} (D) {}

Ans: A


64. यूक्लिडियन एल्गोरिदम का उपयोग करके 48 और 18 का जी.सी.डी. ज्ञात करने के लिए कितने पुनरावर्ती चरणों की आवश्यकता होती है?

The GCD of 48 and 18 using Euclidean Algorithm requires how many recursive steps?

(A) 4 (B) 1 (C) 2 (D) 3

Ans: D

65. अभिकथन A : पायथन को एक इंटरप्रिटेड भाषा माना जाता है।

कारण R : पायथन कोड को पहले बाइटकोड में कंपाइल किया जाता है, जिसे बाद में पायथन वर्चुअल मशीन (पी.वी.एम.) द्वारा निष्पादित किया जाता है।

(A) A गलत है, R सही है

(B) A और R दोनों सही हैं, लेकिन R, A की सही व्याख्या नहीं है

(C) A सही है, R गलत है

(D) A और R दोनों सही हैं, और R, A की सही व्याख्या है


Assertion A : Python is considered an interpreted language.

Reason R : Python code is first compiled into bytecode, which is then executed by the Python Virtual Machine (PVM).

(A) A is false, R is true

(B) Both A and R are true, but R is NOT the correct explanation of A

(C) A is true, R is false

(D) Both A and R are true, and R is the correct explanation of A

Ans: D


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

What is the output of following Python code ?

x = 0

for i in range(1, 4):

if i % 2 == 0:

break

x += i

else:

x += 10

print(x)

(A) 0 (B) 1 (C) 11 (D) 3

Ans: B


67. नंपी क्रिएशन फ़ंक्शन को उसके उद्देश्य से मिलाएँ :

फंक्शन उद्देश्य

a. np.zeros((2,2)) 1. रेंज में समान दूरी पर वैल्यू बनाता है

b. np.ones((3,)) 2. '1' से भरा हुआ ऐरे बनाता है

c. np.arange(0,10,2) 3. '0' से भरा हुआ 2x2 ऐरे बनाता है

d. np.linspace(0,1,5) 4. दो एंडपॉइंट्स के बीच समान दूरी पर वैल्यू बनाता है

Match the NumPy creation function with its purpose :

Function Purpose

a. np.zeros((2,2)) 1. Creates evenly spaced values in range

b. np.ones((3,)) 2. Creates an array filled with ones

c. np.arange(0,10,2) 3. Creates a 2x2 array filled with 0

d. np.linspace(0,1,5) 4. Creates equally spaced values between two endpoints

(A) a-3, b-2, c-1, d-4

(B) a-2, b-3, c-4, d-1

(C) a-3, b-2, c-4, d-1

(D) a-4, b-1, c-2, d-3

Ans: C

68. write() और writelines() के बारे में कौन सा कथन सही है ?

(A) writelines() अपने आप न्यूलाइन कैरेक्टर जोड़ता है

(B) write() एक साथ कई स्ट्रिंग राइट कर सकता है

(C) writelines() स्ट्रिंग की लिस्ट को ठीक वैसे ही राइट करता है जैसे वह दी गई है

(D) write() केवल इंटीजर राइट कर सकता है


Which statement about write() and writelines() is TRUE ?

(A) writelines() automatically adds newline characters

(B) write() can write multiple strings at once

(C) writelines() writes a list of strings exactly as provided

(D) write() can only write integers

Ans: C


69. निम्नलिखित कथनों को सही (T) या गलत (F) के रूप में चिह्नित करें।

1. एल्गोरिदम हमेशा एक प्रोग्रामिंग भाषा में लिखे जाने चाहिए।

2. कम्पाइलेशन हाई-लेवल कोड को मशीन कोड में बदलता है।

3. टेस्टिंग शुद्धता सुनिश्चित करती है, जबकि डीबगिंग त्रुटियों को दूर करती है।

4. डॉक्यूमेंटेशन कोड के रखरखाव को बेहतर बनाता है।


Mark the following statements as True (T) or False (F).

1. Algorithms must always be written in a programming language.

2. Compilation converts high-level code to machine code.

3. Testing ensures correctness, debugging removes errors.

4. Documentation improves the maintainability of code.

(A) 1-F, 2-T, 3-T, 4-T

(B) 1-T, 2-T, 3-T, 4-T

(C) 1-F, 2-T, 3-T, 4-F

(D) 1-F, 2-F, 3-F, 4-T

Ans: A


70. पायथन डिक्शनरी में सर्च करने की वर्स्ट-केस टाइम कॉम्प्लेक्सिटी क्या है ?

What is the worst-case time complexity of searching in a Python dictionary ?

(A) O(n) (B) O(1) (C) O(n log n) (D) O(log n)

Ans: A


71. फ़ंक्शन को कॉल करते समय जो आर्गुमेंट्स पास किए जाते हैं, उन्हें ____ कहा जाता है।

(A) एक्चुअल आर्गुमेंट्स (B) फॉर्मल आर्गुमेंट्स

(C) रेफरेंस आर्गुमेंट्स (D) वैल्यू आर्गुमेंट्स


The arguments passed at the time of calling a function are called ____.

(A) actual arguments (B) formal arguments

(C) reference arguments (D) value arguments

Ans: A

72. निम्नलिखित में से कौन-सा विकल्प गणना के मूल मॉडल को सही ढंग से परिभाषित करता है?

(A) इनपुट → एल्गोरिदम → आउटपुट

(B) इनपुट → स्यूडोकोड → इंटरप्रेटर → आउटपुट

(C) इनपुट → कंट्रोल फ्लो → डीबगिंग → आउटपुट

(D) इनपुट → प्रोग्राम → कंपाइलर → आउटपुट


Which of the following correctly defines the basic model of computation?

(A) Input → Algorithm → Output

(B) Input → Pseudocode → Interpreter → Output

(C) Input → Control Flow → Debugging → Output

(D) Input → Program → Compiler → Output

Ans: A


73. पाइथन में एंगल x को रेडियन से डिग्री में बदलने के लिए किस फ़ंक्शन का उपयोग किया जाता है?

Which function is used to convert an angle x from radians to degrees in Python?

(A) math.degree(x) (B) math.degrees(x) (C) math.deg(x) (D) math.deg_rad(x)

Ans: B


74. अगर arr = np.linspace(0,1,5) है, तो arr क्या है?

If arr = np.linspace(0,1,5), what is arr?

(A) 0.25 (B) 0.5 (C) 0.75 (D) Error[2]

Ans: B


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

What will be the output of the following Python code?

x = 10

def outer():

x = 20

def inner():

nonlocal x

x = 30

inner()

print(x)

outer()

(A) 10 (B) 20 (C) 30 (D) Error

Ans: C

76. पायथन में ऐरे एट्रिब्यूट्स को उनके अर्थ से मिलाएँ :

एट्रिब्यूट अर्थ

a. ndim 1. ऐरे में एलिमेंट्स की संख्या

b. shape 2. डाइमेशन्स की संख्या

c. size 3. डाइमेशन्स का ट्यूपल

d. dtype 4. एलिमेंट्स का डेटा टाइप

Match array attributes in Python with their meaning :

Attribute Meaning

a. ndim 1. Number of elements in array

b. shape 2. Number of dimensions

c. size 3. Tuple of dimensions

d. dtype 4. Data type of elements

(A) a-1, b-2, c-4, d-3 (B) a-2, b-1, c-3, d-4

(C) a-4, b-3, c-1, d-2 (D) a-2, b-3, c-1, d-4

Ans: D


77. निम्नलिखित में से कौन सी समस्या पायथन में रिकर्शन का उपयोग करके हल नहीं की जा सकती?

(A) फिबोनाची (B) फैक्टोरियल (C) कोई नहीं (D) टावर ऑफ हनोई


Which of the following problems cannot be solved using recursion in Python?

(A) Fibonacci (B) Factorial (C) None (D) Tower of Hanoi

Ans: C


78. Python से जुड़े इन वाक्यों को सही (T) या गलत (F) के तौर पर चिह्नित करें :

1. list1 =[1,2,3] ; list2 = list1; list1[0] = 99 करने पर list2 भी अपडेट हो जाएगी।

2. ट्यूपल्स भी लिस्ट्स की तरह ही इंडेक्सिंग और स्लाइसिंग को सपोर्ट करते हैं।

3. डिक्शनरी की कुंजियाँ इम्यूटेबल होनी चाहिए।

4. "Hello"[1:4] का परिणाम "ell" होता है।[1][2][3][0]


Mark the following statements related to Python as True (T) or False (F) :

1. list1 =[1,2,3] ; list2 = list1; list1[0] = 99 will also update list2.

2. Tuples support indexing and slicing like lists.

3. Dictionary keys must be immutable objects.

4. "Hello"[1:4] results in "ell".

(A) 1-F, 2-F, 3-T, 4-T (B) 1-T, 2-T, 3-F, 4-F

(C) 1-T, 2-T, 3-T, 4-F (D) 1-T, 2-T, 3-T, 4-T

Ans: D

79. पायथन में स्ट्रिंग मेथड्स के बारे में इनमें से कौन सा कथन गलत है?

(A) capitalize() पूरी स्ट्रिंग के केवल पहले कैरेक्टर को बदलता है।

(B) upper() ओरिजिनल स्ट्रिंग को बदलता है।

(C) startswith() प्रीफिक्स का ट्यूपल स्वीकार कर सकता है।

(D) swapcase() अपरकेस को लोअरकेस में और लोअरकेस को अपरकेस में बदलता है।


Which of the following statements about string methods in Python is FALSE?

(A) capitalize() changes only the first character of the entire string.

(B) upper() modifies the original string.

(C) startswith() can accept a tuple of prefixes.

(D) swapcase() converts uppercase to lowercase and vice versa.

Ans: B


80. रिकर्सिव बाइनरी सर्च की टाइम कॉम्प्लेक्सिटी क्या है?

What is the time complexity of recursive binary search?

(A) O(1) (B) O(n) (C) O(n log n) (D) O(log n)

Ans: D


81. file.seek(0, 1) क्या करेगा?

(A) फ़ाइल पॉइंटर को फ़ाइल की शुरुआत में ले जाएगा।

(B) फ़ाइल पॉइंटर को फ़ाइल के अंत में ले जाएगा।

(C) फ़ाइल पॉइंटर को फ़ाइल में दूसरी पोजीशन पर ले जाएगा।

(D) फ़ाइल पॉइंटर को फ़ाइल की करेंट पोजीशन पर ले जाएगा।


What will file.seek(0, 1) perform?

(A) Move the file pointer to the beginning of the file.

(B) Move the file pointer to the end of the file.

(C) Move the file pointer to the second position in the file.

(D) Move the file pointer to the current file position.

Ans: D


82. मान लीजिए कि आप Python में arr = np.array([, ]) बनाते हैं। तो arr[1, :2] का आउटपुट क्या होगा?

Suppose you create arr = np.array([[1,2,3 ],[4,5,6]]) in Python. What is the output of arr[1, :2]?

(A) [1,2](B)[4,5] (C) [2,3](D) Error

Ans: B


83. अभिकथन A : readline() मेथड पूरी फ़ाइल के कंटेंट को लाइनों की एक लिस्ट के तौर पर रीड करता है।

कारण R : readline() एक बार में एक लाइन रीड करता है, जब तक कि उसे न्यूलाइन कैरेक्टर न मिल जाए।

(A) A और R दोनों सही हैं, और R, A का सही स्पष्टीकरण है

(B) A और R दोनों सही हैं, लेकिन R, A का सही स्पष्टीकरण नहीं है

(C) A सही है, R गलत है

(D) A गलत है, R सही है


Assertion A : The readline() method reads the entire file content as a list of lines.

Reason R : readline() reads one line at a time until it encounters a newline character.

(A) Both A and R are true, and R is the correct explanation of A

(B) Both A and R are true, but R is not the correct explanation of A

(C) A is true, R is false

(D) A is false, R is true

Ans: D

84. पायथन में, कौन सा मॉड्यूल π और e जैसे गणितीय कॉन्स्टेंट तक पहुँच प्रदान करता है?

In Python, which module provides access to mathematical constants like π and e?

(A) sys (B) cmath (C) random (D) math

Ans: D


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

What is the output of the following code :

def f(x, y=[]):

y.append(x)

return y

print(f(1))

print(f(2))

(A)[1],[2], (B)[1],[1,2], (C) Error (D),[1,2][1,2]

Ans: D


86. किसी पूर्णांक के अंकों को रिवर्स करने के लिए आप किस एल्गोरिदम का उपयोग करेंगे?

(A) यूक्लिडियन जी.सी.डी. (B) डिवाइड एंड मॉड्यूलो अप्रोच

(C) एक्सपोनेंशिएशन (D) लीनियर सर्च

Which algorithm would you apply to reverse digits of an integer?

(A) Euclidean GCD (B) Divide and Modulo approach

(C) Exponentiation (D) Linear Search

Ans: B


87. मशीन लर्निंग अनुप्रयोगों में, कौन सी पायथन लाइब्रेरी डीप लर्निंग के लिए उच्च-स्तरीय ए.पी.आई. प्रदान करती है?

(A) टेन्सरफ्लो (B) स्काईकिट-लर्न (C) नंपी (D) पंडास

In machine learning applications, which Python library provides high-level APIs for deep learning?

(A) TensorFlow (B) scikit-learn (C) NumPy (D) Pandas

Ans: A


88. अगर आप मैथ मॉड्यूल से सिर्फ sqrt() फ़ंक्शन को इम्पोर्ट करना चाहते हैं, तो कौन-सा स्टेटमेंट सही है?

If you want to import only the sqrt() function from the math module, which statement is correct?

(A) from math import sqrt (B) import math.sqrt

(C) using math.sqrt (D) import sqrt from math

Ans: A


89. पायथन में, super() फ़ंक्शन क्या करता है?

(A) बेस क्लास के मेथड को कॉल करता है (B) इंटरनल फ़ंक्शन को कॉल करता है

(C) करंट क्लास के कंस्ट्रक्टर को कॉल करता है (D) एक्सटर्नल फ़ंक्शन को कॉल करता है

In Python, what does the super() function do?

(A) Calls the base class method (B) Calls an internal function

(C) Calls the current class constructor (D) Calls an external function

Ans: A

90. प्रोग्रामिंग भाषाओं की पीढ़ियों का उनकी विशेषताओं से मिलान करें :

पीढ़ी विशेषता

1. 1जीएल (मशीन) a. असेंबली निमोनिक्स का उपयोग

2. 2जीएल (असेंबली) b. समस्या-उन्मुख, पोर्टेबल

3. 3जीएल (हाई-लेवल) c. बाइनरी निर्देश

4. 4जीएल d. डिक्लेरेटिव, प्राकृतिक भाषा के अधिक करीब

Match the programming language generations with their characteristics :

Generation Characteristic

1. 1GL (Machine), a. Use of assembly mnemonics

2. 2GL (Assembly) b. Problem-oriented, portable

3. 3GL (High-level) c. Binary instructions

4. 4GL d. Declarative, closer to natural language

(A) 1-a, 2-c, 3-d, 4-b (B) 1-d, 2-c, 3-b, 4-a

(C) 1-c, 2-b, 3-a, 4-d (D) 1-c, 2-a, 3-b, 4-d

Ans: D


91. कौन सी स्ट्रिंग isupper() के लिए True रिटर्न करेगी ?

Which string will return True for isupper() ?

(A) "hELLO123" (B) "HELlO" (C) "HeLLo" (D) "HELLO WORLD"

Ans: D


92. नीचे दिए गए पायथन कोड पर विचार करें।

def f(x, y=10, *args, **kwargs):

return x + y

इनमें से कौन-सी कॉल्स सही हैं ?

1. f(5)

2. f(5, 20)

3. f(5, y=15)

4. f(5, 20, 30, a=40)

(A) केवल 1, 2 (B) केवल 1, 3, 4 (C) केवल 2, 3, 4 (D) 1, 2, 3, 4

Consider the following Python code.

def f(x, y=10, *args, **kwargs):

return x + y

Which of the following calls are valid ?

1. f(5)

2. f(5, 20)

3. f(5, y=15)

4. f(5, 20, 30, a=40)

(A) 1, 2 only (B) 1, 3, 4 only (C) 2, 3, 4 only (D) 1, 2, 3, 4

Ans: D

93. सिंबॉलिक मैथमेटिक्स के लिए कौन सी पायथन लाइब्रेरी सबसे उपयुक्त है?

Which Python library is best suited for symbolic mathematics?

(A) NumPy (B) Pandas (C) SymPy (D) Matplotlib

Ans: C


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

What will be the output of following Python code?

f = open("data.txt", "w+")

f.write("ABCDE")

print(f.read())

(A) ABCDE (B) CDE (C) DE (D) ABC

Ans: B


95. एक हाई-लेवल प्रोग्राम को मशीन-रिडेबल कोड में बदलने की प्रक्रिया को __ कहा जाता है।

(A) एग्जीक्यूशन (B) कम्पाइलेशन (C) पार्सिंग (D) लिंकिंग

The act of converting a high-level program into machine-readable code is called:

(A) Execution (B) Compilation (C) Parsing (D) Linking

Ans: B


96. इनमें से कौन-से ऐरे बनाने वाले फंक्शन स्टेप साइज़ के बजाय पॉइंट्स की संख्या पर निर्भर करते हैं?

1. np.arange()

2. np.linspace()

3. np.logspace()

4. np.zeros()

(A) केवल 1, 3 (B) केवल 2, 3 (C) केवल 2, 4 (D) केवल 1, 2

Which of the following array creation routines depend on the number of points rather than step size?

1. np.arange()

2. np.linspace()

3. np.logspace()

4. np.zeros()

(A) 1, 3 only (B) 2, 3 only (C) 2, 4 only (D) 1, 2 only

Ans: B

97. पायथन में sys. modules डिक्शनरी का क्या उद्देश्य है ?

(A) यह इम्पोर्ट किए गए मॉड्यूल्स के सभी फंक्शन्स को स्टोर करता है।

(B) यह ट्रैक करता है कि मौजूदा सेशन में कौन-से मॉड्यूल्स लोड किए गए हैं।

(C) यह इम्पोर्ट स्टेटमेंट्स के रिज़ल्ट्स को कैश करता है।

(D) यह मॉड्यूल्स के फ़ाइल पाथ्स को स्टोर करता है।

What is the objective of sys. modules dictionary in Python ?

(A) It stores all functions from the imported modules.

(B) It tracks which modules have been loaded in the current session.

(C) It caches the results of import statements.

(D) It stores the file paths of modules.

Ans: B


98. बिना प्रोग्राम को असल में चलाए, हर स्टेप को मैन्युअली ट्रेस करके और वेरिएबल की वैल्यूज की जाँच करके एल्गोरिदम की सही होने की पुष्टि करने की प्रक्रिया को क्या कहते हैं?

(A) ड्राई साल्ट (B) ड्राई रन (C) ड्राई आउटपुट (D) ड्राई इनपुट

What is the process of verifying the correctness of an algorithm by manually tracing each step and examining the values of variables, without actually executing the program is called ?

(A) Dry salt (B) Dry run (C) Dry output (D) Dry input

Ans:B


99. यदि d = {"A":1, "B":2}, तो d.get("C", 5) क्या रिटर्न करेगा ?

(A) 5 (B) 0 (C) कोई नहीं (D) एरर

If d = {"A":1, "B":2}, what will d.get("C", 5) return ?

(A) 5 (B) 0 (C) None (D) Error

Ans: A


100. कमांड लाइन आर्गुमेंट्स के बारे में कौन सा कथन सही है ?

(A) ये डिफ़ॉल्ट रूप से इंटीजर्स के तौर पर स्टोर होते हैं

(B) ये केवल फंक्शंस के अंदर उपलब्ध होते हैं

(C) ये स्ट्रिंग्स के तौर पर स्टोर होते हैं

(D) इनके लिए फ़ाइल हैंडलिंग की ज़रूरत होती है

Which statement about command line arguments is CORRECT ?

(A) They are stored as integers by default

(B) They are available only inside functions

(C) They are stored as strings

(D) They require file handling

Ans: C

 
 
 

Recent Posts

See All
Web Designing Solved Paper July 2026

1. निम्नलिखित में से कौन से सी.एस.एस. नियम गलत हैं ? 1. मार्जिन किसी एलिमेंट के बॉर्डर के अंदर स्पेस जोड़ता है। 2. पैडिंग एलिमेंट के बॉर्डर के बाहर स्पेस जोड़ता है। 3. मार्जिन : ऑटो का उपयोग ब्लॉक एलि

 
 
 
bottom of page