Menu mobile
Home
Programming
Python Tutorial
Java Tutorial
C Tutorial
C++ Tutorial
Web Technology
HTML
CSS
Java Script
PHP
React JS
Node JS
Assignment
MS Office
HTML
CSS
Bootstrap
Java Script
JQuery
AngularJs
Project
Blog
QUIZ ON : python - OPERATORS EXPRESSIONS AND PYTHON STATEMENTS
OPERATORS EXPRESSIONS AND PYTHON STATEMENTS
00:00:00
English
Hindi
Question No# :
01
out of 50
What will the following code output? print(4 & 5)
निम्नलिखित कोड आउटपुट क्या होगा? print(4 & 5)
A.
4
4
B.
5
5
C.
0
0
D.
1
1
Question No# :
02
out of 50
Which one is not a looping structure available in python.
पायथन में कौन सी लूपिंग स्ट्रक्चर अवेलबल नहीं है?
A.
while loop
while loop
B.
for loop
for loop
C.
do while loop
do while loop
D.
all of these
इन सब
Question No# :
03
out of 50
Which of the following is NOT a valid use of a loop in Python?
निम्नलिखित में से कौन सा पायथन में लूप का वैलिड यूज़ नहीं है?
A.
Iterating over a list.
किसी लिस्ट को इटरेटिंग करना।
B.
Iterating over a string.
एक स्ट्रिंग पर इटरेटिंग.
C.
Iterating over a dictionary.
एक ड़िक्शनरी पर इटरेटिंग।
D.
None of the above
इनमे से कोई भी नहीं
Question No# :
04
out of 50
Leading white space at the beginning of each statement, which is used to determine the group of statement.
Leading white space at the beginning of each statement, which is used to determine the group of statement.
A.
Testing
Testing
B.
Indentation
Indentation
C.
Debugging
Debugging
D.
None of the above
None of the above
Question No# :
05
out of 50
Which translator is used to convert assembly language into machine language?
असेंबली भाषा को मशीन भाषा में को बदलने के लिए किस अनुवादक का उपयोग किया जाता है
A.
Compiler
कम्पाइलर
B.
Interpreter
इंटरप्रेटर
C.
Assembler
असेम्बलर
D.
None of these
इनमे से कोई नहीं
Question No# :
06
out of 50
Which symbol is used for bitwise XOR operator
बिटवाइज़ XOR ऑपरेटर के लिए कौन सा प्रतीक प्रयोग किया जाता है?
A.
|
|
B.
&
&
C.
^
^
D.
!
!
Question No# :
07
out of 50
Function range(0, 5, 2) will yield on iterable sequence like
फ़ंक्शन रेंज (0, 5, 2) चलने योग्य अनुक्रम पर उत्पन्न होगी जैसे
A.
[0, 2, 4]
[0, 2, 4]
B.
[1, 3, 5]
[1, 3, 5]
C.
[0, 1, 2, 5]
[0, 1, 2, 5]
D.
[0, 5, 2]
[0, 5, 2]
Question No# :
08
out of 50
Which statement can be use to swap the values of an and b
a और b के मानों को स्वैप करने के लिए किस कथन का उपयोग किया जा सकता है?
A.
a=b,b=a
a=b,b=a
B.
a,b=b,a
a,b=b,a
C.
a=b;b=a
a=b;b=a
D.
a=b and b=a
a=b and b=a
Question No# :
09
out of 50
What plays a vital role in Python programming?
What plays a vital role in Python programming?
A.
Statements
Statements
B.
Control
Control
C.
Structure
Structure
D.
Indentation
Indentation
Question No# :
10
out of 50
Which of the following operators has the lowest precedence ?
निम्नलिखित में से किस ऑपरेटर की प्राथमिकता सबसे कम है?
A.
not
not
B.
%
%
C.
and
and
D.
+
+
Question No# :
11
out of 50
n the Python statement x =a + 5 - b : a + 5 - b is
पायथन कथन में x =a + 5 - b : a + 5 - b is
A.
Operands
Operands
B.
Expression
Expression
C.
operators
operators
D.
Equation
Equation
Question No# :
12
out of 50
What will happen if a for loop tries to iterate over an empty list?
यदि कोई लूप किसी एम्प्टी लिस्ट पर पुनरावृति करने का प्रयास करता है तो क्या होगा?
A.
It will raise an IndexError.
यह एक IndexError बढ़ाएगा।
B.
It will iterate once with a default value of None.
यह कोई नहीं के डिफ़ॉल्ट वैल्यू के साथ एक बार ईट्रेट होगा।
C.
It will not execute the loop body.
यह लूप बॉडी एक्सक्यूट नहीं करेगा.
D.
It will run indefinitely.
यह अनिश्चित काल तक रन करेगा
Question No# :
13
out of 50
what will be the output of :print( 22//3+3/3)
निम्नलिखित कोड का आउटपुट क्या होगा? print( 22//3+3/3)
A.
4
4
B.
4.0
4.0
C.
8
8
D.
8.0
8.0
Question No# :
14
out of 50
Which of the following operators has the highest precedence?
निम्नलिखित में से किस ऑपरेटर की सर्वोच्च प्राथमिकता है?
A.
*
*
B.
**
**
C.
<
<
D.
==
==
Question No# :
15
out of 50
Which statement is generally used as a placeholder?
Which statement is generally used as a placeholder?
A.
continue
continue
B.
break
break
C.
pass
pass
D.
goto
goto
Question No# :
16
out of 50
Which is the most comfortable loop?
सबसे सरल लूप कौन सा है?
A.
do..while
do..while
B.
while
while
C.
for
for
D.
if..elif
if..elif
Question No# :
17
out of 50
Which of the following expressions is an example of type conversion?
निम्न में से कौन सा एक्सप्रेशन्स कन्वर्श़न प्रकार का एक उदाहरण है?
A.
4.0 + float(3)
4.0 + float(3)
B.
5.3 + 6.3
5.3 + 6.3
C.
5.0 + 3
5.0 + 3
D.
3 + 7
3 + 7
Question No# :
18
out of 50
What is the value of the expression 10 + 3 ** 3 * 2?
व्यंजक 10 + 3 ** 3 * 2 का मान क्या है?
A.
28
28
B.
739
739
C.
829
829
D.
64
64
Question No# :
19
out of 50
The operator used to check if both the operands reference the same object memory, is the .......... operator.
ऑपरेटर यह जांचने के लिए प्रयोग किया जाता है कि क्या दोनों ऑपरेंड एक ही ऑब्जेक्ट मेमोरी को संदर्भित करते हैं, ……… ऑपरेटर है।
A.
in
in
B.
is
is
C.
id
id
D.
==
==
Question No# :
20
out of 50
Which of the following is not Logical operator?
Which of the following is not Logical operator?
A.
and
and
B.
or
or
C.
not
not
D.
Assignment
Assignment
Question No# :
21
out of 50
Which operator is also called as Comparative operator?
Which operator is also called as Comparative operator?
A.
Arithmetic
Arithmetic
B.
Relational
Relational
C.
Logical
Logical
D.
Assignment
Assignment
Question No# :
22
out of 50
which one is an Assignment Operator
एसाइन्मेंट आपरेटर है :
A.
#
#
B.
=
=
C.
/
/
D.
&
&
Question No# :
23
out of 50
<p>What will be the output of the following python code?</p><pre>from math import *<br> floor(11.7)</pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><p>from math import *</p><p> floor(11.7)</p>
A.
12
12
B.
11
11.0
C.
11.0
11.0
D.
none of these
इनमे से कोई नहीं
Question No# :
24
out of 50
<p>What will following code segment print?</p><pre>a=True<br>b=False<br>c=False<br>if not a or b:<br><span style="white-space:pre"> </span>print(1)<br>elif not a or not b and c:<br><span style="white-space:pre"> </span>print(2)<br>elif not a or b or not b and a:<br><span style="white-space:pre"> </span>print(3)<br>else:<br><span style="white-space:pre"> </span>print(4)</pre>
<p>What will following code segment print?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a=True<br>b=False<br>c=False<br>if not a or b:<br> print(1)<br>elif not a or not b and c:<br> print(2)<br>elif not a or b or not b and a:<br> print(3)<br>else:<br> print(4)</pre>
A.
1
1
B.
3
3
C.
2
2
D.
4
4
Question No# :
25
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">x = 'abcd'<br></span><span style="font-size: 14px;">for i in range(len(x)):<br></span><span style="font-size: 14px;"> print(i)</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = 'abcd'<br></span><span style="font-size: 14px;">for i in range(len(x)):<br></span><span style="font-size: 14px;"> print(i)</span></pre>
A.
a b c d
a b c d
B.
0 1 2 3
0 1 2 3
C.
error
एरर
D.
1 2 3 4
1 2 3 4
Question No# :
26
out of 50
Which function is used to generate a sequence of numbers in Python loops?
पायथन लूप्स में नंबर्स का सीक्वेंस जनरेट करने के लिए किस फ़ंक्शन का यूज़ किया जाता है?
A.
sequence()
sequence()
B.
range()
range()
C.
list()
list()
D.
loop()
loop()
Question No# :
27
out of 50
<p>What will be the output of the following Python statement?</p><pre><span style="font-size: 14px;">print(chr(ord('b')+1))</span></pre>
<p>निम्नलिखित Python स्टेटमेंट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print(chr(ord('b')+1))</span></pre>
A.
a
a
B.
b
b
C.
c
c
D.
A
A
Question No# :
28
out of 50
<p>What will be the value of the following Python expression?</p> <pre><span class="nu0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">print(4</span><span style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51); font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;"="">+</span><span class="nu0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">2</span><span style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51); font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;"="">**</span><span class="nu0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">5</span><span style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51); font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;"="">//</span><span class="nu0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">10)</span></pre>
<p>निम्नलिखित पायथन एक्सप्रेशन की वैल्यू क्या होगी?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span class="nu0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">print(4</span><span lucida="" console",="" monospace;="" text-align:="" justify;"="" style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51);">+</span><span class="nu0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">2</span><span lucida="" console",="" monospace;="" text-align:="" justify;"="" style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51);">**</span><span class="nu0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">5</span><span lucida="" console",="" monospace;="" text-align:="" justify;"="" style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51);">//</span><span class="nu0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">10)</span></pre>
A.
3
3
B.
7
7
C.
77
77
D.
0
0
Question No# :
29
out of 50
How can we store 2 in a, 3 in b and 4 in c in one line statement.
हम एक लाइन स्टेटमेंट में 2 को a में, 3 को b में और 4 को c में कैसे स्टोर कर सकते हैं।
A.
a=2,b=3,c=4
a=2,b=3,c=4
B.
a,b,c=2,3,4
a,b,c=2,3,4
C.
a=2;b=3;c=4
a=2;b=3;c=4
D.
Both b and c
बी और सी दोनों
Question No# :
30
out of 50
Which of the following is a floor division operator?
निम्न में से कौन फ्लोर डिवीजन ऑपरेटर है?
A.
%
%
B.
/
/
C.
//
//
D.
||
||
Question No# :
31
out of 50
The output of this expression, >>>6*1**3 is ____ .
इस एक्सप्रेशन >>>6*1**3 का आउटपुट ____ है।
A.
6
6
B.
18
18
C.
10
10
D.
None of these
इनमें से कोई नहीं
Question No# :
32
out of 50
What happens when multiple if statements are used instead of if-elif?
क्या होता है जब if-elif के स्थान पर मल्टीपल if स्टेटमेंट्स का यूज़ किया जाता है?
A.
Only the first condition is checked.
केवल फर्स्ट कंडीशन को चेक किया जाता है.
B.
All conditions are checked, even if one is True.
सभी कंडीशंस को चेक किया जाता है,यदि कोई सत्य हो।
C.
It behaves the same as if-elif.
यह if-elif जैसा ही बिहेव करता है।
D.
It raises an error.
यह एक एरर उत्पन्न करता है.
Question No# :
33
out of 50
What will be the result of the expression: 15 and 10?
व्यंजक 15 और 10 का परिणाम क्या होगा?
A.
5
5
B.
1
1
C.
10
10
D.
0
0
Question No# :
34
out of 50
The .......... construct repeats a set of statements a specified number of times or as long as a condition is true.
............ निर्माण एक निर्दिष्ट संख्या में या जब तक कोई शर्त सत्य है, तब तक बयानों के एक सेट को दोहराता है।
A.
selection
selection
B.
repetition
repetition
C.
sequence
sequence
D.
flow
flow
Question No# :
35
out of 50
___ in Python is a counter-controlled loop.
पायथन में काउन्टर कन्ट्रोल्ड लूप है ।
A.
for
for
B.
while
while
C.
Both A and B
A तथा B दोनों
D.
None of the above
उपर्युक्त में से कोई नहीं
Question No# :
36
out of 50
It is a combination of Operators, Operands and Constants
It is a combination of Operators, Operands and Constants
A.
Identifier
Identifier
B.
Expression
Expression
C.
Syntax
Syntax
D.
Task
Task
Question No# :
37
out of 50
<p>What will be the output of the following expression ?</p><pre>print (7//2)<br>print (-7//2)</pre>
<p>निम्नलिखित कोड का आउटपुट क्या होगा ?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">print (7//2)<br>print (-7//2)</pre>
A.
3 -3
3 -3
B.
4 -4
4 -4
C.
3 -4
3 -4
D.
3 3
3 3
Question No# :
38
out of 50
_____ function convert an integer to octal string in python.
पायथन में ______ फंक्शन एक इंटीजर को ऑक्टल स्ट्रिंग में परिवर्तित करता है।
A.
unichr (x)
unichr (x)
B.
oct (x)
oct (x)
C.
chr(x)
chr(x)
D.
None of the these
इनमें से कोई नहीं
Question No# :
39
out of 50
<p>What value does the following expression evaluate to ?</p><pre><span style="font-size: 14px;">print(5 + 8 * ((3*5)-9)/10)</span></pre>
<p>दिए गए कोड का आउटपुट क्या होगा</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print(5 + 8 * ((3*5)-9)/10)</span></pre><p> </p>
A.
9.0
9.0
B.
9.8
9.8
C.
10
10
D.
10.0
10.0
Question No# :
40
out of 50
Function range(3) will yield an iteratable sequence like
फ़ंक्शन range(3)) एक पुनरावृत्त अनुक्रम उत्पन्न करेगा जैसे
A.
[0, 1, 2]
[0, 1, 2]
B.
[0, 1, 2, 3]
[0, 1, 2, 3]
C.
[1, 2, 3]
[1, 2, 3]
D.
[0, 2]
[0, 2]
Question No# :
41
out of 50
Which of the following is an invalid statement in python.
निम्नलिखित में से कौन सा पायथन मे इनवैलिड स्टेटमेन्ट है ।
A.
abc=2,00,000
abc=2,00,000
B.
a,b,c=200,300,400
a,b,c=200,300,400
C.
a_b_c= 2,00,000
a_b_c= 2,00,000
D.
abc=200 300 400
abc=200 300 400
Question No# :
42
out of 50
What is the answer to this expression, 22 % 3 is?
इस एक्सप्रेशन का उत्तर 22% 3 क्या है?
A.
7
7
B.
1
1
C.
0
0
D.
5
5
Question No# :
43
out of 50
<p>What will be the output of the following Python statement?</p><pre><span style="font-size: 14px;">print(chr(ord('A')+32))</span></pre><div><br></div>
<p>निम्नलिखित Python स्टेटमेंट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print(chr(ord('A')+32))</span></pre>
A.
A
A
B.
B
B
C.
a
a
D.
Error
एरर
Question No# :
44
out of 50
Which of the following will give error ?
निम्नलिखित में से कौन त्रुटि देगा?
A.
a=b=c=1
a=b=c=1
B.
a,b,c=1
a,b,c=1
C.
a, b, c = 1, "python", 1.5
a, b, c = 1, "python", 1.5
D.
None of the above
उपर्युक्त में से कोई नहीं
Question No# :
45
out of 50
Which operator is also called as Conditional operator?
Which operator is also called as Conditional operator?
A.
Ternary
Ternary
B.
Relational
Relational
C.
Logical
Logical
D.
Assignment
Assignment
Question No# :
46
out of 50
Which of the following is true for nested loops in Python?
पायथन में नेस्टेड लूप के लिए निम्नलिखित में से कौन सा सत्य है?
A.
The outer loop must run fewer times than the inner loop.
आउटर लूप को इनर लूप की तुलना में कम बार रन करना चाहिए।
B.
Only for loops can be nested.
केवल लूप के लिए नेस्ट किया जा सकता है।
C.
Both for and while loops can be nested.
for और while दोनों लूप को नेस्ट किया जा सकता है।
D.
The inner loop runs only once for each iteration of the outer loop.
इनर लूप आउटर लूप के प्रत्येक इट्रेशन के लिए केवल एक बार रन करता है।
Question No# :
47
out of 50
In Python, which of the following will create a block in a compound statement ?
पायथन में, निम्नलिखित में से कौन कंपाउंड स्टेटमेंट में ब्लॉक बनाएगा?
A.
colon
colon
B.
statements indented at a lower, same level
statements indented at a lower, same level
C.
indentation in any form
indentation in any form
D.
{ }
{ }
Question No# :
48
out of 50
What is the value of the expression 100 // 25 ?
व्यंजक 100//25 का मान क्या है?
A.
4
4
B.
4.0
4.0
C.
2.5
2.5
D.
None of These
None of These
Question No# :
49
out of 50
What will be the result of the expression 10 or 0 ?
व्यंजक 10 या 0 का परिणाम क्या होगा?
A.
0
0
B.
1
1
C.
10
10
D.
1.0
1.0
Question No# :
50
out of 50
What happens if the condition in a while loop is initially False?
यदि थोड़ी देर के लूप में स्थिति शुरू में गलत हो तो क्या होगा?
A.
The loop runs indefinitely.
लूप अनिश्चित काल तक रन करता है.
B.
The loop executes once before terminating.
लूप टर्मिनेट होने से पहले एक बार एक्सक्युट्स होता है।
C.
The loop does not execute.
लूप एक्सक्यूट नहीं होता
D.
It raises an error
यह एक एरर उत्पन्न करता है
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2026
Best Computer Training Institute in Prayagraj (Allahabad)
Best Java Training Institute in Prayagraj (Allahabad)
Best Python Training Institute in Prayagraj (Allahabad)
O Level Online Test in Hindi
Best Website and Software Company in Allahabad