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

MCQs on Python

Ques 101

CCE(P) -2015

आईडीई का क्या अर्थ है?

What does IDE stand for?

[A] Integrated development environment

[B] Integrated design environment

[C] Interior development environment

[D] Interior design environment

Correct Answer : Integrated development environment


Ques 102

CCE(P) -2015

मल्टीवर्ड स्ट्रिंग को पढ़ने के लिए कौन सा अधिक उपयुक्त है?

Which one is more appropriate for reading a multiword string ?

[A] scanf

[B] getchar()

[C] gets

[D] getc

Correct Answer : gets


Ques 103

EPFO SSA 2023

निम्नलिखित में से किस प्रोग्रामिंग भाषा का आविष्कार गुइडो वान रोसम ने किया था?

Which of the following programming languages was invented by Guido van Rossum ?

[A] C++

[B] C

[C] Java

[D] Python

Correct Answer : Python


Ques 104

MP-ITI-COPA-2019

इनमें से कौन सा कोर डेटा प्रकार नहीं है?

Which of these in not a core data type?

[A] Lists

[B] Dictionary

[C] Tuples

[D] Class

Correct Answer : Class


Ques 105

UPPCL AA-2019

निम्नलिखित में से Vvhlcl1 पायथन सदस्यता ऑपरेटर कैसे है?

Vvhlcl1 of the following is a Python Membership Operator?

[A] In

[B] And

[C] Or

[D] Is

Correct Answer : In


Ques 106

UPPCL AA 2019

पायथन में, किस कीवर्ड का उपयोग करके एक फ़ंक्शन परिभाषित किया जाता है?

In Python , a function is defined using which keyword?

[A] Def

[B] Del

[C] Function

[D] My_function()

Correct Answer : Def


Ques 107

UPPCL AA 2019

निम्नलिखित में से कौन सा पायथन चर के लिए नियम नहीं है?

Which of the following is not a rule for Python variable?

[A] A variable name can only contain alphanumeric characters and underscores.

[B] A variable name must start with a letter or the underscore charcter.

[C] Variable name are case insensitive

[D] A variable name cannot start with a number

Correct Answer : Variable name are case insensitive


Ques 108

UPPCL TGT -2023

पाइथन में उपयोग किए जाने वाले "x in y" मेम्बरशिप ऑपरेटर एक्सप्रेशन के लिए कौन-सा सत्य है?

Which is true for the "x in y" membership operator expression used in Python?

[A] Returns dr(true) if a sequence with the specified value exists in the object

[B] Returns true if a sequence with the specified value does not exist in the object

[C] Returns do(true) if the two variables are not the same object

[D] returns do(true) if both variables are the same object

Correct Answer : Returns dr(true) if a sequence with the specified value exists in the object


Ques 109

UPPCL TGT -2023

पाइथन में उपयोग किए जाने वाले अमान्य कम्पैरिजन ऑपरेटर (comparison operator) का चयन कीजिए।

Select the invalid comparison operator used in Python.

[A] >=

[B] <

[C] ==

[D] &=

Correct Answer : &=


Ques 110

UPPCL TGT -2023

पाइथन में लिस्ट बनाने से संबंधित विकल्प का चयन कीजिए।

Select the option related to creating a list in Python.

[A] thislist = <"apple", "banana", "cherry">

[B] thislist = ["apple", "banana", "cherry"]

[C] thislist = ("apple", "banana", "cherry")

[D] thislist = {"apple", "banana", "cherry"}

Correct Answer : thislist = ["apple", "banana", "cherry"]


Ques 111

UPPCL TGT -2023

NumPy ndarray ऐट्रिब्यूट्स के संबंध में गलत विकल्प का चयन कीजिए।

Select the incorrect option regarding NumPy ndarray attributes.

[A] ndarray.shape will return a tuple of integers indicating the number of elements stored along each dimension of the array.

[B] ndarray.size will represent the data type of the elements of the array.

[C] ndarray.ndim will tell you the number of axes, or dimensions, of the array.

[D] ndarray.size will tell you the total number of elements in the array.

Correct Answer : ndarray.size will represent the data type of the elements of the array.


Ques 112

UPPCL TGT -2023

निम्नलिखित में से कौन-सा एक NumPy ndarray एट्रिब्यूट है?

Which of the following is a NumPy ndarray attribute?

[A] ndim

[B] dtype

[C] shape

[D] length

Correct Answer : length


Ques 113

UPPCL TGT -2023

पाइथन डेफिनिशन और स्टेटमेंट युक्त पाइथन फाइलों को क्या कहा जाता है?

What are the Python files containing Python definitions and statements called?

[A] Modules

[B] Sequence

[C] Flowcharts

[D] Algorithm

Correct Answer : Modules


Ques 114

UPPCL TGT -2023

हमें एल्गोरिदम को प्रोग्रामिंग कोड में ट्रांसलेट करने की आवश्यकता क्यों होती है?

Why do we need to translate algorithms into programming code?

[A] so that it can be made into a story

[B] so that it can again be converted into an algorithm

[C] so that the computer can understand it

[D] so that it can be converted into a flowchart

Correct Answer : so that the computer can understand it


Ques 115

UPPCL TGT -2023

पाइथन में, किसी लिस्ट में अंतिम आइटम प्राप्त करने के लिए, चाहे लिस्ट कितनी भी लंबी क्यों न हो, आप किस इंडेक्स का उपयोग कर सकते हैं?

In Python, what index can you use to get the last item in a list, no matter how long the list is?

[A] -1

[B] 0

[C] [[

[D] 1

Correct Answer : -1


Ques 116

UPPCL TGT -2023

प्रोग्रामिंग भाषाओं में कमेंट्स के लिए मान्य विकल्प का चयन कीजिए।

Select the invalid option for comments in programming languages.

[A] JavaScript supports both /* ... / and //

[B] Python doesn't support single line comments like // or #

[C] .CSS supports multi-line comments /•/

[D] HTML comments are enclosed within <!-- -->

Correct Answer : Python doesn't support single line comments like // or #


Ques 117

UPPCL TGT -2023

पायथन में किसी फाइल को डिलीट करने के लिए, आपको OS मॉड्यूल इम्पोर्ट करना होगा और कौन-सा फंक्शन रन करना होगा?

To delete a file in Python, you must import the OS module and run which function?

[A] os.delete()

[B] os.remove()

[C] os.del()

[D] os.put()

Correct Answer : os.remove()


Ques 118

UPPCL TGT -2023

पायथन में की-वैल्यू पेयर्स (key-value pairs) के अव्यवस्थित सेट को क्या कहा जाता है?

What is an unordered set of key-value pairs called in Python?

[A] Dictionary

[B] List

[C] Set

[D] Tuple

Correct Answer : Dictionary


Ques 119

UPPCL TGT -2023

निम्नलिखित में से कौन-सा पायथन मेम्बरशिप ऑपरेटर (Python Membership Operator) है?

Which of the following is a Python Membership Operator?

[A] And

[B] Is

[C] In

[D] Or

Correct Answer : In


Ques 120

UPPCL TGT -2023

नमपाई (NumPy) में, डाइमेंशन्स (dimensions) को क्या कहा जाता है?

In NumPy, what are dimensions called?

[A] Lines

[B] Columns

[C] Bars

[D] Axes

Correct Answer : Axes


Ques 121

UPPCL TGT -2023

पायथन में, जब आप मॉड्यूल इम्पोर्ट करते हैं, तो एलिआस (alias) बनाने के लिए आप किस कीवर्ड का उपयोग कर सकते हैं?

In Python, when you import a module, what keyword can you use to create an alias?

[A] Import

[B] From

[C] As

[D] In

Correct Answer : As


Ques 122

UPPCL TGT -2023

निम्नलिखित में से कौन-सा पायथन बेरिएबल (Python variable) के लिए नियम नहीं है?

Which of the following is not a rule for Python variables?

[A] Variable name cannot start with a number.

[B] Variable names are case sensitive.

[C] Variable names can only contain alphanumeric characters and underscores.

[D] The variable name must start with a letter or an underscore character.

Correct Answer : Variable names are case sensitive.


Ques 123

UPPCL TGT -2023

पायथन में, किस स्टेटमेंट का उपयोग करके हम लूप को रोक सकते हैं, भले ही वाइल लूप कंडीशन (while loop condition) सही हो?

In Python, using which statement we can stop the loop even if the while loop condition is true?

[A] Continue

[B] IF...else

[C] Assert

[D] Break

Correct Answer : Break


Ques 124

UPPCL TGT -2023

पायथन में, किसी भी ऑब्जेक्ट का डेटा प्रकार (data type) प्राप्त करने के लिए किस फ़ंक्शन का उपयोग किया सकता है?

In Python, which function can be used to get the data type of any object?

[A] datatype()

[B] gettype()

[C] type()

[D] typeof(

Correct Answer : type()


Ques 125

UPPCL TGT -2023

निम्नलिखित में से क्या ई-गवर्नेस (e-governance) का लाभ नहीं है?

Which of the following is a python membership operator ?

[A] In

[B] And

[C] Or

[D] Is

Correct Answer : In


Ques 126

UPPCL TGT -2023

In NumPy , what are dimensions called ?

In NumPy , what are dimensions called ?

[A] Lines

[B] Axes

[C] Columns

[D] Bars

Correct Answer : Axes


Ques 127

UPPCL TGT -2023

पायथन में, जब आप कोई मॉड्यूल आयात करते हैं तो उपनाम बनाने के लिए आप किस कीवर्ड का उपयोग कर सकते हैं?

In Python, which keyword can you use to create an alias when you import a module ?

[A] As

[B] Import

[C] In

[D] From

Correct Answer : As


Ques 128

UPPCL TGT -2023

पायथन में, किसी भी ऑब्जेक्ट का डेटा प्रकार प्राप्त करने के लिए किस फ़ंक्शन का उपयोग किया जा सकता है?

In python , which function can be used to get the data type of any object ?

[A] typeof()

[B] gettype()

[C] type()

[D] datatype()

Correct Answer : type()


Ques 129

UPPCL TGT -2023

पायथन में, किस कथन का उपयोग करके हम लूप को रोक सकते हैं भले ही while लूप की स्थिति सत्य हो?

In Python , by using which statement can we stop the loop even if the while loop condition is true ?

[A] If...else

[B] Break

[C] Continue

[D] Assert

Correct Answer : Break


Ques 130

UPPCL TGT -2023

पायथन में कुंजी मान युग्मों के अव्यवस्थित समूह को क्या कहा जाता है?

What is an unordered set of key value pairs in Python called ?

[A] Set

[B] List

[C] Dictionary

[D] Tuple

Correct Answer : Dictionary


Ques 131

RRB-NTPC-2020

निम्नलिखित में से कौन सा एल्गोरिदम का ग्राफिकल प्रतिनिधित्व है?

Which of the following is a graphical representation of an algorithm?

[A] Programming

[B] Software

[C] Flowchart

[D] Pseudocode

Correct Answer : Flowchart


Ques 132

SSC Scientific Assistant CS_IT NOV -2017

निम्नलिखित पृष्ठ संदर्भ स्ट्रिंग पर विचार करें: 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6 3 फ़्रेम वाले इष्टतम पृष्ठ प्रतिस्थापन एल्गोरिदम के लिए, पृष्ठ दोषों की संख्या क्या है?

Consider the following page reference string : 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6 For Optimal page replacement algorithms with 3 frames, the number of page faults is?

[A] 11

[B] 12

[C] 16

[D] 14

Correct Answer : 11


Ques 133

SSC Scientific Assistant CS_IT NOV -2017

फ़ील्ड नाम का नाम बदलने के लिए यहाँ किस कीवर्ड का उपयोग किया जाना चाहिए? नाम चुनें ____ प्रशिक्षक का नाम, प्रशिक्षक से कोर्स आईडी, सिखाता है जहाँ प्रशिक्षक. आईडी = सिखाता है.आईडी;

Which keyword must be used here to rename the field name? Select name ____ instructor name, course id from instructor, teaches where instructor. ID= teaches.ID;

[A] From

[B] Rename

[C] As

[D] Join

Correct Answer : As


Ques 134

SSC Scientific Assistant CS_IT NOV -2017

_________ अखंडता बाधा के लिए आवश्यक है कि संदर्भित संबंध में किसी भी टपल की निर्दिष्ट विशेषताओं में दिखाई देने वाले मान संदर्भित संबंध में कम से कम एक टपल की निर्दिष्ट विशेषताओं में भी दिखाई दें

A _________ integrity constraint requires that the values appearing in specified attributes of any tuple in the referencing relation also appear in specified attributes of at least one tuple in the referenced relation

[A] Referential

[B] Referencing

[C] Specific

[D] Primary

Correct Answer : Referential


Ques 135

SSC Scientific Assistant CS_IT NOV -2017

निम्नलिखित में से उपयोगकर्ता-परिभाषित प्रकारों की पहचान करें?

Identify the user-defined types from the following?

[A] enumeration

[B] classes

[C] both enumeration and classes

[D] int

Correct Answer : both enumeration and classes


Ques 136

SSC Scientific Assistant CS_IT NOV -2017

The value 132.54 can represented using which data type?

The value 132.54 can represented using which data type?

[A] double

[B] void

[C] int

[D] boo

Correct Answer : double


Ques 137

SSC Scientific Assistant CS_IT NOV -2017

शेड्यूलर के कार्य हैं: A. यह चुनता है कि कौन सी प्रक्रिया आगे चलने के लिए तैयार है B. यह समय स्लाइस निर्दिष्ट करता है C. यह निष्पादन जारी रखने से पहले किसी घटना के होने की प्रतीक्षा करता है

The functions of scheduler is / are: A. it selects which process is ready to be run next B. it specifies the time slice C. it is waiting for an event to occur before continuing execution

[A] Only A

[B] Only B

[C] Both A and B

[D] Only C

Correct Answer : Both A and B


Ques 138

SSC Scientific Assistant CS_IT NOV -2017

निम्नलिखित में से कौन सा पृष्ठ प्रतिस्थापन एल्गोरिदम बेलाडी की विसंगति से ग्रस्त है?

Which of the following page replacement algorithms suffers from Belady’s Anomaly ?

[A] Optimal replacement

[B] LRU

[C] FIFO

[D] Both optimal replacement and FIFO

Correct Answer : FIFO


Ques 139

SSC Scientific Assistant CS_IT NOV -2017

For 3 page frames, the following is the reference string : 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 How many page faults does the LRU page replacement algorithm produce ?

For 3 page frames, the following is the reference string : 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 How many page faults does the LRU page replacement algorithm produce ?

[A] 10

[B] 15

[C] 11

[D] 12

Correct Answer : 12


Ques 140

NVS Junior Secretariat Assis(LDC)-2022

खोज एल्गोरिदम जो इंडेक्स का उपयोग करते हैं उन्हें _________ कहा जाता है।

Search algorithms that use an index are referred to as _________.

[A] Index scans

[B] Search scan

[C] Primary scan

[D] Equality scan

Correct Answer : Index scans


Ques 141

SSC Scientific Assistant IT - 2022

मान लीजिए हमारे पास निम्नलिखित पृष्ठ एक्सेस हैं; 3 4 5 6 4 5 6 3 4 3 3 5 3 6 और हमारे सिस्टम में तीन फ्रेम हैं। पहले आओ पहले पाओ पृष्ठ प्रतिस्थापन एल्गोरिथ्म का उपयोग करते हुए, दिए गए संदर्भ स्ट्रिंग के निष्पादन के बाद तीन फ्रेमों का अंतिम विन्यास क्या होगा?

Suppose we have the following page accesses ; 3 4 5 6 4 5 6 3 4 3 3 5 3 6 and that there are three frames with in our system . using the first in first out page replacement algorithm , what will the final configuration of the three frames following the execution of the given reference string ?

[A] 5,6,4

[B] 5,6,3

[C] 4,5,6

[D] 6,5,4

Correct Answer : 5,6,4


Ques 142

TAC-2018

ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग में कंस्ट्रक्टर के बारे में निम्नलिखित में से कौन सा कथन गलत है? 1. कंस्ट्रक्टर का नाम क्लास के नाम के समान होता है 2. इसका रिटर्न वैल्यू हो सकता है 3. कंस्ट्रक्टर वह पहला कोड होता है जिसे ऑब्जेक्ट बनाते समय इनवोक किया जाता है 4. कंस्ट्रक्टर का नाम क्लास के नाम के समान होना ज़रूरी नहीं है

Which of the following statements is /are WRONG about constructor in Object oriented programming ? 1. The name of the constructor is same as class name 2. It can have a return value 3. Constructor is the first code invoked when an object is created 4. Constructor name need not be the same as that of class name

[A] Only 2

[B] Only 3

[C] 2 and 4

[D] 2,3 and 4

Correct Answer : 2 and 4


Ques 143

TAC-2018

ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग में, किसी क्लास की निजी विधियाँ

In object oriented programming , private methods of a class

[A] Can be accessed only within the class

[B] Can be accessed by an object of the class that inherits it

[C] Can be overridden by the class that extends it

[D] All of the above

Correct Answer : Can be accessed only within the class


Ques 144

Tech Assistant -2019

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

What will be the output of the following program segment ?

int i=0; 
int sum=0; 
for (i=1;i<11;i++)
 { 
sum sum + i; 
}
 print (sum);

[A] 55

[B] 66

[C] 45

[D] 35

Correct Answer : 55


Ques 145

Tech Assistant -2019

निम्नलिखित जावा प्रोग्राम पर विचार करें

Considered the following Java program

class TEST{
public static void main(String args[])
{ 
public int x=3;
 protected int y-6; 
private int z=9; 
System.out.println(x+y+z); 
}
} 

[A] Print 369

[B] Print 18

[C] Produces compile time error

[D] It compiles fine but gives runtime exception

Correct Answer : Produces compile time error


Ques 146

Tech Assistant -2019

निम्नलिखित में से कौन सा गलत है:

Which of the following is false:

[A] Recursive function stores its variable in heap

[B] Recursive function can cause stack overflow

[C] Iteration uses less memory than recursion

[D] None of the above.

Correct Answer : Recursive function stores its variable in heap


Ques 147

Tech Assistant -2019

ak(m,n) के लिए निम्नलिखित पुनरावर्ती कोड पर विचार करें

Consider the following recursive code for ak(m,n)

Int ak(m,n)
{
if (m == 0) then
return ( n + 1)
else if (n== 0) then
return (ak(m-1,1))
else
return (ak(m-1,ak(m,n-1)))
}
The value returned when the code is invoked with ak(1,1) is

[A] 5

[B] 3

[C] 4

[D] 2

Correct Answer : 3


Ques 148

Tech Assistant -2019

निम्नलिखित सरणी तत्वों 4,1,3,2,16,9,10,14,8,7 पर विचार करें। सरणी तत्वों को अधिकतम-हीप में परिवर्तित करने के लिए आवश्यक इंटरचेंज की संख्या है

Consider the following array elements 4,1,3,2,16,9,10,14,8,7. The number of interchanges that are necessary to convert the array elements into a max-heap is

[A] 6

[B] 7

[C] 5

[D] 8

Correct Answer : 6


Latest Updates