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
<p>What will be the output of the following Python code snippet? </p><pre>print(not(3>4))<br>print(not(1&1))</pre>
<p>निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">print(not(3>4))<br>print(not(1&1))</pre>
A.
True True
True True
B.
True False
True False
C.
False True
False True
D.
False False
False False
Question No# :
02
out of 50
<p>What is the output of the following code?</p><pre>for i in range(3):<br><span style="white-space: normal;"><span style="white-space:pre"> </span>print(i,end=" ")</span></pre><div><br></div>
निम्नलिखित कोड का परिणाम क्या है?
A.
0 1 2
0 1 2
B.
1 2 3
1 2 3
C.
0 1 2 3
0 1 2 3
D.
Error
Error
Question No# :
03
out of 50
Which keyword is used to exit a loop prematurely in Python?
पायथन में लूप से समय से पहले एग्जिट होने के लिए किस कीवर्ड का यूज़ किया जाता है?
A.
exit
एग्जिट
B.
break
ब्रेक
C.
continue
कंटीन्यू
D.
stop
स्टॉप
Question No# :
04
out of 50
What will the following code output? print(1==1.0)
निम्नलिखित कोड आउटपुट क्या होगा? print(1==1.0)
A.
True
True
B.
False
False
C.
1
1
D.
Error
Error
Question No# :
05
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# :
06
out of 50
What is the output of the expression : 3*1**3 ?
एक्सप्रेशन 3*1**3 आउटपुट क्या है ?
A.
27
27
B.
9
9
C.
3
3
D.
1
1
Question No# :
07
out of 50
What will be the result of the expression print(5 and 10) ?
print(5 and 10) का परिणाम क्या होगा?
A.
5
5
B.
1
1
C.
10
10
D.
0
0
Question No# :
08
out of 50
Which of the following operators has the lowest precedence ?
निम्नलिखित में से किस ऑपरेटर की प्राथमिकता सबसे कम है?
A.
not
not
B.
%
%
C.
and
and
D.
+
+
Question No# :
09
out of 50
Which of the following operators has the highest precedence?
निम्नलिखित में से किस ऑपरेटर की सर्वोच्च प्राथमिकता है?
A.
+
+
B.
-
-
C.
*
*
D.
( )
( )
Question No# :
10
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">i = 0<br></span><span style="font-size: 14px;">while i < 3:<br></span><span style="font-size: 14px;"> print(i)<br></span><span style="font-size: 14px;"> i += 1<br></span><span style="font-size: 14px;">else:<br></span><span style="font-size: 14px;"> print(0)</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">i = 0<br></span><span style="font-size: 14px;">while i < 3:<br></span><span style="font-size: 14px;"> print(i)<br></span><span style="font-size: 14px;"> i += 1<br></span><span style="font-size: 14px;">else:<br></span><span style="font-size: 14px;"> print(0)</span></pre>
A.
0 1 2 3 0
0 1 2 3 0
B.
0 1 2 0
0 1 2 0
C.
0 1 2
0 1 2
D.
error
एरर
Question No# :
11
out of 50
What will the following code output? print( 12/4/2)
निम्नलिखित कोड आउटपुट क्या होगा? print( 12/4/2)
A.
6
6
B.
1
1
C.
1.5
1.5
D.
Error
Error
Question No# :
12
out of 50
Which relational operator means not equal to?
कौन सा संबंधवाचक संवाहक 'बराबर नहीं' का अर्थ दर्शाता है?
A.
=
=
B.
!=
!=
C.
<>
<>
D.
=!
=!
Question No# :
13
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">x = "abcdef"<br></span><span style="font-size: 14px;">while i in x:<br></span><span style="font-size: 14px;"> print(i, end=" ")</span></pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = "abcdef"<br></span><span style="font-size: 14px;">while i in x:<br></span><span style="font-size: 14px;"> print(i, end=" ")</span></pre>
A.
a b c d e f
a b c d e f
B.
abcdef
abcdef
C.
i i i i i i …
i i i i i i …
D.
error
error
Question No# :
14
out of 50
Which symbol is used for bitwise XOR operator
बिटवाइज़ XOR ऑपरेटर के लिए कौन सा प्रतीक प्रयोग किया जाता है?
A.
|
|
B.
&
&
C.
^
^
D.
!
!
Question No# :
15
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# :
16
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# :
17
out of 50
What is the output of the code print (9//2)
कोड प्रिंट का आउटपुट क्या है (9//2)
A.
4.5
4.5
B.
4.0
4.0
C.
4
4
D.
Error
Error
Question No# :
18
out of 50
<p>What will be the output of the following Python code?</p><pre>from math import pow<br>print(math.pow(2,3))</pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">from math import pow<br>print(math.pow(2,3))</pre>
A.
Nothing is printed
Nothing is printed
B.
8
8
C.
Error, method pow doesn’t exist in math module
Error, method pow doesn’t exist in math module
D.
Error, the statement should be: print(pow(2,3))
Error, the statement should be: print(pow(2,3))
Question No# :
19
out of 50
In python language, which of the following operators is the correct option for raising k to the power 1?
पायथन भाषा में, k को पावर 1 तक बढ़ाने के लिए निम्नलिखित में से कौन सा ऑपरेटर सही विकल्प है?
A.
k^1
k^1
B.
k**1
k**1
C.
k^ ^1
k^ ^1
D.
k^*1
k^*1
Question No# :
20
out of 50
Which one of the following has the same precedence level?
निम्नलिखित में से किसका समान प्रेसडेंस लेवल है?
A.
Addition and Subtraction
एडिशन और सब्ट्रैक्शन
B.
Multiplication, Division and Addition
मल्टीप्लिकेशन,डिवीज़न और एडिशन
C.
Multiplication, Division, Addition and Subtraction
मल्टीप्लिकेशन,डिवीज़न एडिशन और सब्ट्रैक्शन
D.
Addition and Multiplication
एडिशन और मल्टीप्लिकेशन
Question No# :
21
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">x = "abcdef"<br></span><span style="font-size: 14px;">i = "i"<br></span><span style="font-size: 14px;">while i in x:<br></span><span style="font-size: 14px;"> print(i, end=" ")</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = "abcdef"<br></span><span style="font-size: 14px;">i = "i"<br></span><span style="font-size: 14px;">while i in x:<br></span><span style="font-size: 14px;"> print(i, end=" ")</span></pre>
A.
no output
नो आउटपुट
B.
i i i i i i …
i i i i i i …
C.
a b c d e f
a b c d e f
D.
abcdef
abcdef
Question No# :
22
out of 50
What will the following code output? print(‘55’+’5’)
निम्नलिखित कोड आउटपुट क्या होगा? print(‘55’+’5’)
A.
55
55
B.
60
60
C.
555
555
D.
Error
एरर
Question No# :
23
out of 50
<p>What will be the output of the following Python code?</p> <pre class="de1" style="border-radius: 0px; padding: 0px; font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"=""> <span style="font-size: 12.6px;">x = "abcdef" i = "a" while i in x: print('i', end = " ")</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre>x = "abcdef"<br>i = "a"<br>while i in x:<br> print('i', end = " ")</pre><div><br></div>
A.
no output
नो आउटपुट
B.
i i i i i i … infinite Time
i i i i i i … अनंत समय
C.
a a a a a a …
a a a a a a …
D.
a b c d e f
a b c d e f
Question No# :
24
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# :
25
out of 50
In Python, a complex number is represented as:
पायथन में, एक काम्प्लेक्स संख्या को इस प्रकार दर्शाया जाता है:
A.
a+√b
a+√b
B.
a+√b j
a+√b j
C.
a+bj
a+bj
D.
a+√j
a+√j
Question No# :
26
out of 50
Which term describes a loop that continues repeating without a terminating (ending) condition ?
कौन सा शब्द एक लूप का वर्णन करता है जो बिना किसी समाप्ति (समाप्त) स्थिति के दोहराना जारी रखता है?
A.
Infinite Loop
इन्फाईनाइट लूप
B.
conditional loop
कंडीशनल लूप
C.
unlimited loop
अनलिमीटेड लूप
D.
None of these
इनमें से कोई नहीं
Question No# :
27
out of 50
In Python, a variable is assigned a value of one type, and then later assigned a value of a different type. This will yield
पायथन में, एक चर को एक प्रकार का मान दिया जाता है, और फिर बाद में एक अलग प्रकार का मान दिया जाता है। यह उपज देगा
A.
Warning
Warning
B.
Error
Error
C.
Error
Error
D.
No Error
No Error
Question No# :
28
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# :
29
out of 50
What will be the value of x=(5*2-4*8)%7
x=(5*2-4*8)%7 का मान क्या होगा?
A.
10
10
B.
9
9
C.
7
7
D.
6
6
Question No# :
30
out of 50
What is the return value of trunc()?
trunc() फंक्शन क्या रिटर्न करेगा ?
A.
int
int
B.
bool
bool
C.
float
float
D.
None
None
Question No# :
31
out of 50
<p>What is the output of the following code? </p><pre>print(True and False)</pre>
<p>निम्नलिखित कोड का आउटपुट क्या है? </p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">print(True and False)</pre>
A.
True
सही
B.
False
ग़लत
C.
Error
एरर
D.
None
कोई नहीं
Question No# :
32
out of 50
<p>What will the following code output? </p><pre>a,b,c=3,5,6 <br>b,c,a=a,b,c <br>print(a,” ”,b,” ”,c)</pre>
<p>निम्नलिखित कोड आउटपुट क्या होगा? </p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a,b,c=3,5,6 <br>b,c,a=a,b,c <br>print(a,” ”,b,” ”,c)</pre>
A.
3 5 6
3 5 6
B.
6 3 5
6 3 5
C.
5 6 3
5 6 3
D.
6 5 3
6 5 3
Question No# :
33
out of 50
<p>What will be the output after the following statements?</p><pre>for i in range(1,6):<br> print(i, end='')<br> if i == 3:<br> break</pre>
<p>निम्नलिखित स्टेटमेंट के बाद आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">for i in range(1,6):<br> print(i, end='')<br> if i == 3:<br> break</pre>
A.
1 2
1 2
B.
1 2 3
1 2 3
C.
1 2 3 4
1 2 3 4
D.
1 2 3 4 5
1 2 3 4 5
Question No# :
34
out of 50
Which amongst this is not a jump statement ?
Which amongst this is not a jump statement ?
A.
for
for
B.
goto
goto
C.
continue
continue
D.
break
break
Question No# :
35
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# :
36
out of 50
Which of the following is not an immutable type in Python ?
निम्नलिखित में से कौन पायथन में एक अपरिवर्तनीय प्रकार नहीं है?
A.
String
String
B.
Tuples
Tuples
C.
Set
Set
D.
None of these
None of these
Question No# :
37
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# :
38
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# :
39
out of 50
How many times will loop run? for a in "56247839"
लूप कितनी बार चलेगा? for a in "56247839"
A.
11
11
B.
8
8
C.
1
1
D.
0
0
Question No# :
40
out of 50
Which of the following refers to mathematical function?
निम्नलिखित में से कौन गणितीय फंक्शन को संदर्भित करता है
A.
sqrt
sqrt
B.
rhombus
rhombus
C.
add
add
D.
Sub
Sub
Question No# :
41
out of 50
____ is the output you get when '2'==2 is executed
____ वह आउटपुट है जो आपको तब मिलता है जब '2'==2 निष्पादित होता है-
A.
True
सही
B.
false
गलत
C.
ValueError occurs
ValueError होती है
D.
TypeError occurs
TypeError होता है
Question No# :
42
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# :
43
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# :
44
out of 50
<p>What will the following code output?</p><pre>x=0<br>if x:<br><span style="white-space: normal;"><span style="white-space:pre"> </span>print("True")<br></span>else:<br><span style="white-space: normal;"><span style="white-space:pre"> </span>print("False")</span></pre>
निम्नलिखित कोड आउटपुट क्या होगा?
A.
True
True
B.
False
False
C.
None
None
D.
Error
Error
Question No# :
45
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# :
46
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# :
47
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# :
48
out of 50
What is the the value of x when x=math.factorial(0)
x का मान क्या है जब x=math.factorial(0)
A.
0
0
B.
1
1
C.
11
11
D.
10
10
Question No# :
49
out of 50
Which of the following data types is not supported in python
Which of the following data types is not supported in python
A.
Numbers
Numbers
B.
String
String
C.
List
List
D.
Slice
Slice
Question No# :
50
out of 50
<p>What does the following code will print ?</p><pre><span style="font-size: 14px;">x=5<br></span><span style="font-size: 14px;">if x>3:<br></span><span style="font-size: 14px;"> print("Hello")</span></pre><div><br></div>
<p>म्नलिखित कोड क्या प्रिंट करेगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x=5<br></span><span style="font-size: 14px;">if x>3:<br></span><span style="font-size: 14px;"> print("Hello")</span></pre>
A.
Hello
Hello
B.
Hello Hello
Hello Hello
C.
nothing
nothing
D.
Hello Hello Hello Hello Hello
Hello Hello Hello Hello Hello
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