Python MCQ Online Test with Answers
241.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘ab12’.isalnum())
A) True ✔️
B) False
C) None
D) Error
242.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘ab,12’.isalnum())
A) True
B) False ✔️
C) None
D) Error
243.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘ab’.isalpha())
A) True ✔️
B) False
C) None
D) Error
244.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘a B’.isalpha())
A) True
B) False ✔️
C) None
D) Error
245.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘0xa’.isdigit())
A) True
B) False ✔️
C) None
D) Error
246.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(”.isdigit())
A) True
B) False ✔️
C) None
D) Error
247.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘my_string’.isidentifier())
A) True ✔️
B) False
C) None
D) Error
248.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘__foo__’.isidentifier())
A) True ✔️
B) False
C) None
D) Error
249.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘for’.isidentifier())
A) True ✔️
B) False
C) None
D) Error
250.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘abc’.islower())
A) True ✔️
B) False
C) None
D) Error
251.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘[email protected] 1,’.islower())
A) True ✔️
B) False
C) None
D) Error
252.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(’11’.isnumeric())
A) True ✔️
B) False
C) None
D) Error
253.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘1.1’.isnumeric())
A) True
B) False ✔️
C) None
D) Error
254.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘[email protected] a’.isprintable())
A) True ✔️
B) False
C) None
D) Error
255.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(”””.isspace())
A) True
B) False ✔️
C) None
D) Error
256.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“Hello {1} and {0}”.format(‘bin’, ‘foo’))
A) Hello foo and bin ✔️
B) Hello bin and foo
C) Error
D) None of the mentioned
257.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“Hello {} and {}”.format(‘foo’, ‘bin’))
A) Hello foo and bin ✔️
B) Hello {} and {}
C) Error
D) Hello and
258.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“Hello {name1} and {name2}”.format(‘foo’,
‘bin’))
A) Hello foo and bin
B) Hello {name1} and {name2}
C) Error ✔️
D) Hello and
259.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“Hello {name1} and
{name2}”.format(name1=’foo’, name2=’bin’))
A) Hello foo and bin ✔️
B) Hello {name1} and {name2}
C) Error
D) Hello and
260.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“Hello {0!r} and {0!s}”.format(‘foo’, ‘bin’))
A) Hello foo and foo
B) Hello ‘foo’ and foo ✔️
C) Hello foo and ‘bin’
D) Error
261.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“Hello {0} and {1}”.format((‘foo’, ‘bin’)))
A) Hello foo and bin
B) Hello (‘foo’, ‘bin’) and (‘foo’, ‘bin’)
C) Error ✔️
D) None of the mentioned
262.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“Hello {0[0]} and {0[1]}”.format((‘foo’,’bin’)))
A) Hello foo and bin ✔️
B) Hello (‘foo’, ‘bin’) and (‘foo’, ‘bin’)
C) Error
D) None of the mentioned
263.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘The sum of {0} and {1} is {2}’.format(2, 10,12))
A) The sum of 2 and 10 is 12 ✔️
B) Error
C) The sum of 0 and 1 is 2
D) None of the mentioned
264.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘The sum of {0:b} and {1:x} is {2:o}’.format(2,10, 12))
A) The sum of 2 and 10 is 12
B) The sum of 10 and a is 14 ✔️
C) The sum of 10 and a is c
D) Error
265.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘{:,}’.format(1112223334))
A) 1,112,223,334 ✔️
B) 111,222,333,4
C) 1112223334
D) Error
266.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘{:,}’.format(‘1112223334’))
A) 1,112,223,334
B) 111,222,333,4
C) 1112223334
D) Error ✔️
267.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘{:$}’.format(1112223334))
A) 1,112,223,334
B) 111,222,333,4
C) 1112223334
D) Error ✔️
268. What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘{:#}’.format(1112223334))
A) 1,112,223,334
B) 111,222,333,4
C) 1112223334 ✔️
D) Error
269.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘{0:.2}’.format(1/3))
A) 0.333333
B) 0.33 ✔️
C) 0.333333:.2
D) Error
270. What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘{0:.2%}’.format(1/3))
A) 0.33
B) 0.33%
C) 33.33% ✔️
D) 33%
Relate Link
- M3-R-5 Python Programming MCQ-1
- M3-R-5 Python Programming MCQ-2
- M3-R-5 Python Programming MCQ-3
- M3-R-5 Python Programming MCQ-4
- M3-R-5 Python Programming MCQ-5
- M3-R-5 Python Programming MCQ-6
- M3-R-5 Python Programming MCQ-7
- M3-R-5 Python Programming MCQ-8
- M3-R-5 Python Programming MCQ-9
- M3-R-5 Python Programming MCQ-10
- M3-R-5 Python Programming MCQ-11
- M3-R-5 Python Programming MCQ-12
- M3-R-5 Python Programming MCQ-13
- M3-R-5 Python Programming MCQ-14
- M3-R-5 Python Programming MCQ-15
- M3-R-5 Python Programming MCQ-16
- M3-R-5 Python Programming MCQ-17
- M3-R-5 Python Programming MCQ-18
- M3-R-5 Python Programming MCQ-19
- About me