MCQs on Python

Ques 1

UPPCL Technician 2021

पायथन निम्नलिखित में से किस प्रोग्रामिंग भाषा पीढ़ी से संबंधित है?

Python belongs to which of the following programming language generation?

[A] Fourth

[B] First

[C] Third

[D] Second

Correct Answer : Fourth


Ques 2

MPESB Police Constable 2023

पायथन में, वर्णों के क्रमागत अनुक्रम को कहा जाता है:

In python, consecutive sequence of characters is known as a :

[A] String

[B] List

[C] Dictionaries

[D] Tuples

Correct Answer : String


Ques 3

RSMSSSB IA 2023

पायथन में उपयोगकर्ता परिभाषित फ़ंक्शन कीवर्ड __ का उपयोग करके लिखे गए हैं

User defined functions in Python are written using the keyword __

[A] define

[B] Define

[C] def

[D] Def

Correct Answer : def


Ques 4

UPPCL AA 2021

निम्नलिखित में से कौन सा एक कम्प्यूटेशनल समस्या को हल करने के लिए चरण-दर-चरण प्रक्रिया का प्रतिनिधित्व करता है?

Which of the following represents a step-by-step process to solve a computational problem?

[A] Algorithm

[B] Routine

[C] Function

[D] Number system

Correct Answer : Algorithm


Ques 5

MPESB Group-4 2023

निम्नलिखित में से कौन सा ' नो आर्ग्युमेंट ' फ़ंक्शन है?

Which one of the following is ‘no argument’ function?

[A] Now()

[B] Lower()

[C] Max()

[D] IF()

Correct Answer : Now()


Ques 6

Chhattisgarh ITI 2023

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

What is the output of the following code snippet?

const arr = [1, 2, 3, 4, 5];
arr.splice(1, 2, ‘a’, ‘b’);
console.log(arr);

[A] [1, ‘a’, ‘b’, 4, 5]

[B] [1, 2, 3, ‘a’, ‘b’]

[C] [1, 2, ‘a’, ‘b’, 4, 5]

[D] [1, 3, 4, 5, ‘a’, ‘b’]

Correct Answer : [1, ‘a’, ‘b’, 4, 5]


Ques 7

UPPCL-TG2-2021

जावा और पायथन किस प्रकार की कंप्यूटर प्रोग्रामिंग भाषा हैं?

What type of computer programming language are Java and Python?

[A] Procedural programming language

[B] High-level programming language

[C] Low-level programming language

[D] Assembly programming language

Correct Answer : High-level programming language


Ques 8

UPPCL-TG2-2021

__________ एक चरणबद्ध प्रक्रिया है, जो वांछित आउटपुट प्राप्त करने के लिए एक निश्चित क्रम में निष्पादित किए जाने वाले निर्देशों के एक सेट को परिभाषित करती है।

A/An __________is a step by step procedure , which defines a set of instruction to be executed in a certain order to get the desired output .

[A] Order

[B] Algorithum

[C] Sequence

[D] Protocol

Correct Answer : Algorithum


Ques 9

UPPCL-TG2-2021

पायथन में, मॉड्यूल केवल एक _______ एक्सटेंशन वाली फाइलें होती हैं जिनमें पायथन कोड होता है जिसे किसी अन्य पायथन प्रोग्राम के अंदर आयात किया जा सकता है।

In Python, modules are simply files with the a _______extension containing a python code that can be imported inside another Python program.

[A] .1st

[B] .txt

[C] .dat

[D] .py

Correct Answer : .py


Ques 10

UPPCL-TG2-2021

_______ एक एकीकृत विकास वातावरण (आईडीई) है जो पायथन के साथ आता है।

A/An _______is an integrated development environment (IDE) that comes with Python .

[A] Visual studio

[B] Net Beans

[C] IDLE

[D] Datagrip

Correct Answer : IDLE


Ques 11

UPPCL-TG2-2021

एक कंपाइलर सॉफ्टवेयर जो उच्च स्तरीय भाषा में लिखे गए स्रोत कोड को मशीन भाषा निर्देश के एक सेट में अनुवाद करता है, उसे ________ के रूप में जाना जाता है।

A compiler software that translate sources code written in a high -level language into a set of machine language instruction is known as ________ .

[A] Compiler

[B] Operating system

[C] Firmware

[D] Device driver

Correct Answer : Compiler


Ques 12

CTS-COPA 2024

पाइथन में पिप का क्या अर्थ है?

What does pip stand for python?

[A] Unlimited Length

[B] All private members must have leading and trailing underscres

[C] Preferred installer Program

[D] None of the mentioned

Correct Answer : Preferred installer Program


Ques 13

CTS-COPA 2024

निम्नलिखित में से कौन पायथन प्रोग्रामिंग में कोर डेटा प्रकार नहीं है?

Which of the following is not a core data type in Python programming ?

[A] Tuples

[B] Lists

[C] Class

[D] Dictionary

Correct Answer : Class


Ques 14

CTS-COPA 2024

निम्नलिखित में से किसकी अभिव्यक्ति में सर्वोच्च प्राथमिकता है?

Which one of the following has the highest precedence in the expression?

[A] Division

[B] Substraction

[C] Power

[D] Parentheses

Correct Answer : Parentheses


Ques 15

CTS-COPA 2024

निम्नलिखित में से कौन सा ऑपरेटर पावर(a^b) के लिए सही विकल्प है?

Which of the following operators is the correct option for power(a^b)?

[A] a^b

[B] a**b

[C] a^^b

[D] a^*b

Correct Answer : a**b


Ques 16

CTS-COPA 2024

निम्नलिखित में से कौन सा एक वैध पायथन if कथन है?

Which one of the following is a valid Python if statement ?

[A] if a>=2:

[B] if(a>=2)

[C] if(a=>22)

[D] ifa>=22

Correct Answer : if a>=2:


Ques 17

JSSC - CGL-2023

_______ एक उच्च स्तरीय भाषा प्रोग्राम को मशीन-स्तरीय भाषा प्रोग्राम में अनुवाद करता है।

The _______translate a high-level language program to a machine-level language program.

[A] Compiler

[B] Assembler

[C] Linker

[D] Compiler and assembler

Correct Answer : Compiler


Ques 18

OSSC CGL 2022

वह विशेष प्रोग्राम जो प्रोग्रामिंग भाषा में लिखे कोड को मशीन कोड में अनुवादित करता है, ________ है।

The special program that translates code written in a programming language to machine code is ________.

[A] Assembler

[B] Library functions

[C] Header files

[D] Compiler

Correct Answer : Compiler


Ques 19

OSSC CGL 2022

फ्लोचार्ट में किसी ऑपरेशन को दर्शाने वाला प्रतीक _________________ है

The symbol that represents an operation in a flowchart is _________________

[A] Rectangle

[B] Ellipse

[C] Diamond

[D] Circle

Correct Answer : Rectangle


Ques 20

OSSC CGL 2022

कंप्यूटर में किसी कार्य को पूरा करने के लिए चरणबद्ध प्रक्रिया के सेट को _______ के रूप में जाना जाता है।

In computers, a set of step by step procedure for accomplishing a task is known as __________.

[A] Debugging

[B] Algorithm

[C] Approach

[D] Assertion

Correct Answer : Algorithm


Ques 21

UPSSSC JA 2023

K-मीन्स एल्गोरिथ्म एक ______ एल्गोरिथ्म है।

The K-Means algorithm is an ______ algorithm .

[A] Supervised Learning

[B] Unsupervised Learning

[C] Semi-supervised Learning

[D] Reinforcement Learning

Correct Answer : Unsupervised Learning


Ques 22

MP ITI Training Officer 2022

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

What will be the output of the following Python function?

len(["hello", 2, 4, 6])

[A] Error

[B] 4

[C] 3

[D] 6

Correct Answer : 4


Ques 23

Rajasthan Basic Computer Instructor 2022

पायथन भाषा में निम्नलिखित में से कौन सी घोषणा गलत है?

Which of the following declarations is incorrect in python language?

[A] xyzp = 5000 6000 7000 8000

[B] x_y_z_p = 5,000,000

[C] x, y, z, p = 5000, 6000, 7000, 8000

[D] xyzp = 5,000,000

Correct Answer : xyzp = 5000 6000 7000 8000


Ques 24

Rajasthan Basic Computer Instructor 2022

अपवाद प्रबंधन के बारे में कौन सा कथन सत्य है/हैं? i. कैच ब्लॉक के बिना ट्राई ब्लॉक हो सकता है लेकिन इसका विपरीत संभव नहीं है। ii. ट्राई ब्लॉक के अनुरूप कैच, ब्लॉक की संख्या की कोई सीमा नहीं है। iii. ऑब्जेक्ट को एक विशिष्ट वर्ग से बनाया जाना चाहिए जिसमें त्रुटि हुई है अन्यथा रनटाइम त्रुटि उत्पन्न होगी। iv. प्रोग्राम के प्रत्येक रन के साथ एक कोड निष्पादित करने के लिए, कोड को अंततः ब्लॉक में लिखा जाता है।

Which statement is/are true about Exception handling? i. There can be try block without catch block but vice versa is not possible. ii. There is no limit on the number of catch, block corresponding to a try block. iii. The object must be created of a specific class of which the error has occurred otherwise runtime error will occur. iv. To execute a code with each and every run of program, the code is written in finally block.

[A] i and ii, iv

[B] Only iii

[C] ii and iv Only

[D] Only ii

Correct Answer : i and ii, iv


Ques 25

MP Patwari 2017

फ्लोचार्ट हमें ___________ में मदद करता है।

Flowchart help us to ___________.

[A] Specify the problem completely and clearly

[B] Knows the capacity of the memory

[C] Both (1) and (2)

[D] None of these

Correct Answer : Specify the problem completely and clearly


Ques 26

COMPUTER OPERATOR 2022

_________ किसी प्रोग्राम की शुरुआत या समाप्ति को दर्शाता है।

__________ denotes the beginning or ending of a program.

[A] Flow line

[B] Rectangle

[C] Oval

[D] Diamond

Correct Answer : Oval


Ques 27

COMPUTER OPERATOR 2022

__________ डेटा प्रवाह का प्रतीक है।

__________ symbolizes the data flow.

[A] Pie chart

[B] Scatter chart

[C] Flowchart

[D] Area chart

Correct Answer : Flowchart


Ques 28

COMPUTER OPERATOR 2022

एक एल्गोरिथ्म की जटिलता इसका प्रतिनिधित्व करती है

Complexity of an algorithm represents its

[A] Performance

[B] Toughness

[C] Obscurity

[D] Correctness

Correct Answer : Performance


Ques 29

COMPUTER OPERATOR 2022

संगणना तर्क को दृश्य रूप से दर्शाया जा सकता है

Computation logic can be represented visually by using

[A] Visual Basic

[B] Foxpro

[C] Flow chart

[D] VI editor

Correct Answer : Flow chart


Ques 30

HPSSB Assistant programmer 2022

एक फ्लो-चार्ट में, उल्टे समलम्ब चतुर्भुज का उपयोग किसका प्रतिनिधित्व करने के लिए किया जाता है?

In a flow-chart , the invert trapezoid is used to represent

[A] On-line storage symbol

[B] Manual operations

[C] Communication link

[D] Show annotation

Correct Answer : Show annotation


Ques 31

Programmer -2013

निम्नलिखित एल्गोरिथ्म के अनुसार न्यूनतम स्पैनिंग ट्री बनाने से पहले सभी किनारों को क्रमबद्ध करना आवश्यक है

The following algorithm requires all the edges to be ordered before making the minimum spanning tree

[A] Dijkstra algorithm

[B] Kruskal algorithm

[C] Prim algorithm

[D] None

Correct Answer : Kruskal algorithm


Ques 32

MPESB -2023

पायथन में, कोड ब्लॉक को कैसे निरूपित किया जाता है?

In Python, how is a code block denoted?

[A] Space

[B] Brackets

[C] Underscore

[D] Indentation

Correct Answer : Indentation


Ques 33

MPESB -2023

निम्नलिखित पायथन प्रोग्राम निष्पादित होने पर कौन सा फ़ंक्शन कॉल किया जाता है? f = foo() format(f)

Which function is called when the following Python program is executed? f = foo() format(f)

[A] str()

[B] format()

[C] __str__()

[D] __format__()

Correct Answer : __str__()


Ques 34

MPESB -2023

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

What would the following bit of code produce?

List = [“yellow” , “red” , “green” ,“pink”]
del list[2]
print(list)

[A] [“yellow” , “red” , “ green” ]

[B] [“yellow” , “red” , “ green” ,“ pink”]

[C] [“yellow” , “ green” ,“pink”]

[D] [“yellow” , “red” ,“pink”]

Correct Answer : [“yellow” , “red” ,“pink”]


Ques 35

MPESB -2023

निम्नलिखित में से कौन-सा फ़ंक्शन हमें वर्तमान में काम कर रहे पायथन के संस्करण को खोजने में मदद कर सकता है?

Which of the following functions can help us to find the version of python that we are currently working on?

[A] sys.version(1) / sys.version(1)

[B] sys.version(0) / sys.version(0)

[C] sys.version() / sys.version()

[D] sys.version / sys.version

Correct Answer : sys.version / sys.version


Ques 36

MPESB-2023

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

What will be the output of the following Python function?

len(["hello",2, 4, 6])

[A] Error

[B] 6

[C] 4

[D] 3

Correct Answer : 4


Ques 37

MPESB-2023

निम्नलिखित में से कौन-सा पायथन प्रोग्रामिंग में कोर डेटा प्रकार नहीं है?

Which of the following is not a core data type in Python programming?

[A] Tuples

[B] Lists

[C] Class

[D] Dictionary

Correct Answer : Class


Ques 38

MPESB-2023

एक __________ डिज़ाइन टूल है जो ग्राफ़िक रूप से साल्‍यूशन एल्गोरिथम में तर्क दिखाता है

A __________ is a design tool that graphically shows the logic in a solution algorithm.

[A] Flowchart

[B] Hierarchy Chart

[C] Structure Chart

[D] Context Chart

Correct Answer : Flowchart


Ques 39

HPSSSB -2018

_______ किसी दी गई समस्या को हल करने के लिए किए जाने वाले कार्यों के अनुक्रम का एक आरेखीय प्रतिनिधित्व है।

A/An _______ is a diagrammatic representation of the sequence of operations to be performed to solve a given problem.

[A] Flowchart

[B] Data Flow Diagram

[C] Gantt Chart

[D] Algorithm

Correct Answer : Flowchart


Ques 40

HSSC-CET-MAINS-2024

एक कॉलम या पंक्ति संख्या जोड़ने के लिए, उपयोग किया जाने वाला लाइब्रेरी फ़ंक्शन है

To add a column or a row number , the library function used is

[A] AVERAGE

[B] SUM

[C] COUNT

[D] MAX

Correct Answer : AVERAGE


Ques 41

BIHAR STET-2023

कौन सा शब्द किसी एल्गोरिथ्म के संसाधनों के उपयोग को अनुकूलित करने की रणनीति को संदर्भित करता है, जिसमें अक्सर एक पहलू में सुधार के लिए दूसरे पहलू में बलिदान दिया जाता है

Which term refers to the strategy of optimizing an algorithm's use of resources, often by making sacrifices in one aspect for improvements in another?

[A] Greedy algorithm

[B] Divide and conquer

[C] Dynamic programming

[D] Tradeoff

Correct Answer : Tradeoff


Ques 42

BIHAR STET-2023

पुनरावर्तन को हटाने की प्रक्रिया में पुनरावर्ती फ़ंक्शन कॉल को प्रतिस्थापित करना शामिल है:

The process of removing recursion involves replacing recursive function calls with:

[A] More recursive function calls

[B] Loops

[C] Additional memory allocation

[D] Non-recursive function calls

Correct Answer : Loops


Ques 43

BIHAR STET-2023

गेम ट्री में जीत/हार का निर्णय लेने के लिए प्रयुक्त एल्गोरिथ्म ________________ है?

The algorithm used in the Game tree to make decisions of Win/Lose is ________________?

[A] Heuristic Search Algorithm

[B] DFS/ BFL algorithm

[C] Greedy Search algorithm

[D] Min/Max algorithm

Correct Answer : Min/Max algorithm


Ques 44

BIHAR STET-2023

निम्नलिखित में से कौन सा अमूर्त डेटा प्रकार का सामान्य उदाहरण नहीं है

Which of the following is not a common example of an abstract data type?

[A] Stack

[B] Integer

[C] Queue

[D] List

Correct Answer : Integer


Ques 45

BIHAR STET-2023

संसाधन मैट्रिक्स एक डेटा संरचना है जिसका उपयोग डेडलॉक डिटेक्शन एल्गोरिदम में किया जाता है:

The resource matrix is a data structure used in deadlock detection algorithms to:

[A] Represent resource allocation

[B] Represent the execution order of processes

[C] Represent the execution history of processes

[D] Represent the priority of processes

Correct Answer : Represent resource allocation


Ques 46

DSSSB TGT -2023

निम्नलिखित में से कौन सा कंप्यूटर प्रोग्राम में परिवर्तित करना सबसे आसान है?

Which of the following is the easiest to be transformed into a computer program ?

[A] Pseudo-code

[B] Algorithm

[C] Flowchart

[D] None of the above

Correct Answer : Pseudo-code


Ques 47

DSSSB TGT -2023

फ्लोचार्ट में प्रोग्राम के अन्य भागों के साथ प्रोग्राम लिंक को ___________ द्वारा दर्शाया जाता है।

Programs links with other parts of the program in a flowchart are represented by ___________.

[A] Rectangles

[B] Circle

[C] Trapezoids

[D] Rhombuses

Correct Answer : Circle


Ques 48

DSSSB TGT -2023

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

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

[A] Flowchart

[B] Source code

[C] Program

[D] Pseudo code

Correct Answer : Flowchart


Ques 49

DSSSB TGT -2023

पायथन भाषा में स्ट्रिंग्स के साथ d का उपयोग करने वाला निम्न में से कौन सा फ़ंक्शन उच्चतम ASCII मान वाले वर्ण को लौटाता है?

Which of the following type of function use d with strings in the Python language re turns the character with the highest ASCII value ?

[A] len( )

[B] hvalue( )

[C] max ( )

[D] long ( )

Correct Answer : max ( )


Ques 50

DSSSB TGT -2023

निम्नलिखित पायथन कोड के लिए सही आउटपुट का चयन करें?

Select the correct output for the following python code ?

a=20
b=35
if a>=b: 
     print("yes")
else:
     print("no")

[A] Syntax

[B] No

[C] Yes

[D] Error

Correct Answer : No


Latest Updates