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
Provide the output for the expression: list = [1, 2] + [3, 4]
list= [1, 2] + [3, 4] का आउटपुट क्या होगा
A.
[4,6]
[4,6]
B.
[1, 2, 3, 4]
[1, 2, 3, 4]
C.
10
10
D.
Error in Code
Error in Code
Question No# :
02
out of 50
which function is used to get the ASCII value of any Character in PYthon?
पायथन में किसी भी वर्ण का ASCII मान प्राप्त करने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
A.
ascii()
ascii()
B.
getAscii()
getAscii()
C.
get_ascii()
get_ascii()
D.
ord()
ord()
Question No# :
03
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# :
04
out of 50
What will the following code output? print(5/0)
निम्नलिखित कोड आउटपुट क्या होगा? print(5/0)
A.
0
Zero
B.
infinite
इनफिनिट
C.
5
फाइव
D.
ZeroDivisionError
ज़ीरोडिविज़नएरर
Question No# :
05
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
यह एक एरर उत्पन्न करता है
Question No# :
06
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# :
07
out of 50
To increase the value of x five times using an augmented assignment operator, the correct expression will be
संवर्धित असाइनमेंट ऑपरेटर का उपयोग करके x के मान को पांच गुना बढ़ाने के लिए, सही अभिव्यक्ति होगी
A.
x += 5
x += 5
B.
x *= 5
x *= 5
C.
x = x ** 5
x = x ** 5
D.
none of these
none of these
Question No# :
08
out of 50
Which of the following is true about the break statement in loops?
लूप्स में ब्रेक स्टेटमेंट के बारे में निम्नलिखित में से कौन सा सत्य है?
A.
It skips the current iteration and goes to the next iteration.
यह प्रेजेंट इट्रेशन को स्किप कर देता है और नेक्स्ट इट्रेशन पर चला जाता है।
B.
It terminates the loop entirely
यह लूप को पूरी तरह से टर्मिनेट कर देता है।
C.
It does nothing.
यह कुछ नहीं करता.
D.
It restarts the loop.
यह लूप को रीस्टार्ट करता है।
Question No# :
09
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(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(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.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
10
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# :
11
out of 50
Which of the following is not a valid keyword of Python associated with loops?
निम्नलिखित में से कौन लूप से सम्बन्धित पायथन का वैलिड कीवर्ड नहीं है?
A.
continue
continue
B.
check
चेक
C.
range
रेंज
D.
break
ब्रेक
Question No# :
12
out of 50
<p>What will be the value of the following Python expression?</p><pre><span style="font-size: 14px;">print(float(4+int(2.39)%2))</span></pre>
<p>निम्नलिखित पायथन एक्सप्रेशन की वैल्यू क्या होगी ?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print(float(4+int(2.39)%2))</span></pre>
A.
5.0
5.0
B.
5
5
C.
4.0
4.0
D.
4
4
Question No# :
13
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">i = 1<br></span><span style="font-size: 14px;">while True:<br></span><span style="font-size: 14px;"> if i%7 == 0:<br></span><span style="font-size: 14px;"> break<br></span><span style="font-size: 14px;"> print(i)<br></span><span style="font-size: 14px;"> i += 1</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">i = 1<br></span><span style="font-size: 14px;">while True:<br></span><span style="font-size: 14px;"> if i%7 == 0:<br></span><span style="font-size: 14px;"> break<br></span><span style="font-size: 14px;"> print(i)<br></span><span style="font-size: 14px;"> i += 1</span></pre>
A.
1 2 3 4 5 6
1 2 3 4 5 6
B.
1 2 3 4 5 6 7
1 2 3 4 5 6 7
C.
error
एरर
D.
none of the mentioned
इनमें से कोई नहीं
Question No# :
14
out of 50
Is it safe to directly use the == operator to determine whether objects of type float are equal ?
क्या यह निर्धारित करने के लिए सीधे == ऑपरेटर का उपयोग करना सुरक्षित है कि फ्लोट प्रकार की वस्तुएं बराबर हैं या नहीं?
A.
Yes
Yes
B.
No
No
C.
Yes, if the values are < 100
Yes, if the values are < 100
D.
Yes, if the values are > 100
Yes, if the values are > 100
Question No# :
15
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# :
16
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# :
17
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# :
18
out of 50
Which of the following operators has the highest precedence?
निम्नलिखित में से किस ऑपरेटर की सर्वोच्च प्राथमिकता है?
A.
+
+
B.
-
-
C.
*
*
D.
( )
( )
Question No# :
19
out of 50
Which bitwise operator represents AND?
कौन सा बिटवाइज़ ऑपरेटर AND को दर्शाता है?
A.
~
~
B.
|
|
C.
&
&
D.
^
^
Question No# :
20
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# :
21
out of 50
What is range() Funciton ?
रेंज क्या है?
A.
generates a list of numbers, to iterate over with for loops
लिस्ट ऑफ नंबर्स को जनरेट करना ताकि वो फॉर लूप पर इटरेट हो ।
B.
immediate exit from the innermost loop structure.
इनरमोस्ट लूप में से इमीडियेट एग्जिट
C.
returned an iterator a sequence object.
सीक्वेंस ऑब्जेक्ट का इटरेटर रिटर्न करता है।
D.
Arranging numbers whether in ascending or descending order.
संख्याओं को आरोही या अवरोही क्रम में व्यवस्थित करना ।
Question No# :
22
out of 50
_____ is not used as loop in python
पायथन में लूप के रूप में _____ का उपयोग नहीं किया जाता है
A.
for
for
B.
while
while
C.
do while
do while
D.
None of the above
None of the above
Question No# :
23
out of 50
A loop block in python starts with a.. -
पायथन में एक लूप ब्लॉक एक... से शुरू होता है
A.
; (semicolon)
; (semicolon)
B.
,(Comma)
,(Comma)
C.
: (colan)
: (colan)
D.
None of these
कोई नही
Question No# :
24
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# :
25
out of 50
<p>What is the output of the following program:</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=i+1<br></span><span style="font-size: 14px;"> print (i+1)</span></pre><div><br></div>
<p>निम्नलिखित प्रोग्राम का आउटपुट क्या है:</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=i+1<br></span><span style="font-size: 14px;"> print (i+1)</span></pre>
A.
0 2 1 3 2 4
0 2 1 3 2 4
B.
0 1 2 3 4 5
0 1 2 3 4 5
C.
Infinite loop
Infinite loop
D.
0 1 2 3
0 1 2 3
Question No# :
26
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# :
27
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# :
28
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# :
29
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# :
30
out of 50
range(3) in Python is equivalent to:
पायथन में रेंज (3) के बराबर है:
A.
range(0,3,1)
range(0,3,1)
B.
range(1,4,1)
range(1,4,1)
C.
range(1,3)
range(1,3)
D.
range(1,3,0)
range(1,3,0)
Question No# :
31
out of 50
The order of statement execution in the form of top to bottom, is known as .......... construct.
ऊपर से नीचे के रूप में कथन निष्पादन के क्रम को ……… निर्माण के रूप में जाना जाता है।
A.
selection
selection
B.
repetition
repetition
C.
sequence
sequence
D.
flow
flow
Question No# :
32
out of 50
<p>What will be the output of the following pseudocode, where ^ represent XOR operation ?</p><pre>Integer a, b, c<br>set b = 4, a = 3<br>c =a ^ b<br>Print c</pre>
<p>निम्नलिखित स्यूडोकोड का आउटपुट क्या होगा, जहाँ ^, XOR ऑपरेशन का प्रतिनिधित्व करता है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">Integer a, b, c<br>set b = 4, a = 3<br>c =a ^ b<br>Print c</pre>
A.
4
4
B.
3
3
C.
5
5
D.
7
7
Question No# :
33
out of 50
What is true about a break statement?
ब्रेक स्टेटमेंट के बारे में क्या सच है?
A.
Break stops the execution of entire program
Break stops the execution of entire program
B.
Break halts the execution and forces the control out of the loop
Break halts the execution and forces the control out of the loop
C.
Break forces the control out of the loop and starts the execution of next iteration
Break forces the control out of the loop and starts the execution of next iteration
D.
Break halts the execution of the loop for certain time frame
Break halts the execution of the loop for certain time frame
Question No# :
34
out of 50
which one is a mathematical function?
कौन सा एक गणितीय फंक्शन है?
A.
sqrt()
sqrt()
B.
add()
add()
C.
rhombus()
rhombus()
D.
home()
home()
Question No# :
35
out of 50
<p>What will be the output of the following expression ?</p><pre>x =4<br>print(x<<2)</pre><div><br></div>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">x =4<br>print(x<<2)</pre>
A.
4
4
B.
16
16
C.
6
6
D.
2
2
Question No# :
36
out of 50
<p>What will be the output after following statements?</p><pre>x = 2<br>if x < 5:<br> print(x)<br>else:<br> pass</pre><div><br></div>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">x = 2<br>if x < 5:<br> print(x)<br>else:<br> pass</pre>
A.
2 3 4
2 3 4
B.
1 2 3 4
1 2 3 4
C.
2
2
D.
None of These
None of These
Question No# :
37
out of 50
Can we write if / else into one line in python?
क्या हम पाइथन में एक लाइन में if / else लिख सकते हैं?
A.
Yes
Yes
B.
No
No
C.
if / else not used in python
if / else not used in python
D.
None of the above.
उपर्युक्तमें से कोई नहीं
Question No# :
38
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# :
39
out of 50
<p>find the output of following code:</p><pre><span style="font-size: 14px;">import math<br></span><span style="font-size: 14px;">print(math.fabs(-3.4))</span></pre><div><br></div>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">import math<br></span><span style="font-size: 14px;">print(math.fabs(-3.4))</span></pre>
A.
-3.4
-3.4
B.
3.4
3.4
C.
4.3
4.3
D.
3
3
Question No# :
40
out of 50
<p>What is the output?</p><pre><span style="font-size: 14px;">x = 5<br></span><span style="font-size: 14px;">print(bool(x))</span></pre>
<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;">print(bool(x))</span></pre>
A.
False
False
B.
True
True
C.
5
5
D.
Error
Error
Question No# :
41
out of 50
Which symbol is used for bitwise XOR operator
बिटवाइज़ XOR ऑपरेटर के लिए कौन सा प्रतीक प्रयोग किया जाता है?
A.
|
|
B.
&
&
C.
^
^
D.
!
!
Question No# :
42
out of 50
<p>What will be the output?</p><pre><span style="font-size: 14px;">x = 10<br></span><span style="font-size: 14px;">y = x<br></span><span style="font-size: 14px;">x = 20<br></span><span style="font-size: 14px;">print(y)</span></pre>
<p>इसका परिणाम क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = 10<br></span><span style="font-size: 14px;">y = x<br></span><span style="font-size: 14px;">x = 20<br></span><span style="font-size: 14px;">print(y)</span></pre>
A.
10
10
B.
20
20
C.
Error
Error
D.
None
None
Question No# :
43
out of 50
Which of the following statements is used to test multiple conditions in Python?
निम्नलिखित में से किस स्टेट्मेंट का यूज़ पायथन में मल्टिपल कंडीशन का टेस्ट करने के लिए किया जाता है?
A.
if
if
B.
if-else
if-else
C.
elif
elif
D.
if-else-if
if-else-if
Question No# :
44
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# :
45
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# :
46
out of 50
<p>What will be the output after the following statements?</p><pre>a = 0<br>b = 3<br>while a + b < 8:<br> a += 1<br> print(a, end='')</pre>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a = 0<br>b = 3<br>while a + b < 8:<br> a += 1<br> print(a, end='')</pre>
A.
0 1 2 3 4
0 1 2 3 4
B.
1 2 3 4 5 6
1 2 3 4 5 6
C.
1 2 3 4 5
1 2 3 4 5
D.
None of these
None of these
Question No# :
47
out of 50
The data type of an expression int(m)/int(n) will result in:
एक अभिव्यक्ति का डेटा प्रकार int(m)/int(n) परिणाम देगा:
A.
Int
Int
B.
Float
Float
C.
int or float
int or float
D.
None of these
None of these
Question No# :
48
out of 50
Which of the following statement(s) will terminate the whole loop and proceed to the statement following the loop ?
निम्नलिखित में से कौन सा कथन पूरे लूप को समाप्त कर देगा और लूप के बाद वाले कथन पर आगे बढ़ेगा?
A.
pass
pass
B.
break
break
C.
continue
continue
D.
goto
goto
Question No# :
49
out of 50
The for loop in Python is an ____ .
पॉयथन में फॉर लूप...... है ।
A.
Entry Controlled Loop
इंट्री कंट्रोल्ड लूप
B.
Exit Controlled Loop
एक्जिट कंट्रोल्ड लूप
C.
Both of the above
उपर्युक्त दोनों
D.
None of the above
उपर्युक्त में से कोई नहीं
Question No# :
50
out of 50
Give the output of: print(2^5)
इसका आउटपुट क्या होगा : print(2^5)
A.
32
32
B.
7
7
C.
10
10
D.
3
3
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