NIELIT M3-R5 Python MCQ Questions
271.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘abcdef12’.replace(‘cd’, ’12’))
A) ab12ef12 ✔️
B) abcdef12
C) ab12efcd
D) none of the mentioned
272.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘abef’.replace(‘cd’, ’12’))
A) abef ✔️
B) 12
C) error
D) None of the mentioned
Answer: a
273.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘abcefd’.replace(‘cd’, ’12’))
A) ab1ef2
B) abcefd ✔️
C) ab1efd
D) ab12ed2
274.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘xyyxyyxyxyxxy’.replace(‘xy’, ’12’, 0))
A) xyyxyyxyxyxxy ✔️
B) 12y12y1212x12
C) 12yxyyxyxyxxy
D) xyyxyyxyxyx12
275.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘xyyxyyxyxyxxy’.replace(‘xy’, ’12’, 100))
A) xyyxyyxyxyxxy
B) 12y12y1212x12 ✔️
C) None of the mentioned
D) error
276.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘abcdefcdghcd’.split(‘cd’))
A) [‘ab’, ‘ef’, ‘gh’]
B) [‘ab’, ‘ef’, ‘gh’, “] ✔️
C) (‘ab’, ‘ef’, ‘gh’)
D) (‘ab’, ‘ef’, ‘gh’, “)
Answer: b
277.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘abcdefcdghcd’.split(‘cd’, 0))
A) [‘abcdefcdghcd’] ✔️
B) ‘abcdefcdghcd’
C) error
D) None of the mentioned
278.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘abcdefcdghcd’.split(‘cd’, -1))
A) [‘ab’, ‘ef’, ‘gh’]
B) [‘ab’, ‘ef’, ‘gh’, “] ✔️
C) (‘ab’, ‘ef’, ‘gh’)
D) (‘ab’, ‘ef’, ‘gh’, “)
279.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘abcdefcdghcd’.split(‘cd’, 2))
A) [‘ab’, ‘ef’, ‘ghcd’] ✔️
B) [‘ab’, ‘efcdghcd’]
C) [‘abcdef’, ‘ghcd’]
D) none of the mentioned
280.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘ab\ncd\nef’.splitlines())
A) [‘ab’, ‘cd’, ‘ef’] ✔️
B) [‘ab\n’, ‘cd\n’, ‘ef\n’]
C) [‘ab\n’, ‘cd\n’, ‘ef’]
D) [‘ab’, ‘cd’, ‘ef\n’]
281.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘Ab!2’.swapcase())
A) [email protected]
B) ab12
C) aB!2 ✔️
D) [email protected]
282.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘ab cd ef’.title())
A) Ab cd ef
B) Ab cd eF
C) Ab Cd Ef ✔️
D) None of the mentioned
283.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘ab cd-ef’.title())
A) Ab cd-ef
B) Ab Cd-ef
C) Ab Cd-Ef ✔️
D) None of the mentioned
284.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘abcd’.translate(‘a’.maketrans(‘abc’, ‘bcd’)))
A) bcde
B) abcd
C) error
D) bcdd ✔️
285.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘abcd’.translate({97: 98, 98: 99, 99: 100}))
A) bcde
B) abcd
C) error
D) None of the mentioned ✔️
286.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘\t’.isspace())
A) True ✔️
B) False
C) None
D) Error
287.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘HelloWorld’.istitle())
A) True
B) False ✔️
C) None
D) Error
288.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘Hello World’.istitle())
A) True ✔️
B) False
C) None
D) Error
289.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘[email protected]#World’.istitle())
A) True ✔️
B) False
C) None
D) error
290.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘[email protected]’.lower())
A) n
B) [email protected] ✔️
C) rn
D) r
291.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(”’
\tfoo”’.lstrip())
A) \tfoo
B) foo ✔️
C) foo
D) None of the mentioned
292.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘xyyzxxyxyy’.lstrip(‘xyy’))
A) error
B) zxxyxyy ✔️
C) z
D) zxxy
293.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘xyxxyyzxxy’.lstrip(‘xyy’))
A) zxxy ✔️
B) xyxxyyzxxy
C) xyxzxxy
D) none of the mentioned
294.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘cba’.maketrans(‘abc’, ‘123’))
A) {97: 49, 98: 50, 99: 51} ✔️
B) {65: 49, 66: 50, 67: 51}
C) 321
D) 123
295.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘a’.maketrans(‘ABC’, ‘123’))
A) {97: 49, 98: 50, 99: 51}
B) {65: 49, 66: 50, 67: 51} ✔️
C) {97: 49}
D) 1
296.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘abcdef’.partition(‘cd’))
A) (‘ab’, ‘ef’)
B) (‘abef’)
C) (‘ab’, ‘cd’, ‘ef’) ✔️
D) 2
297.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘abcdefcdgh’.partition(‘cd’))
A) (‘ab’, ‘cd’, ‘ef’, ‘cd’, ‘gh’)
B) (‘ab’, ‘cd’, ‘efcdgh’) ✔️
C) (‘abcdef’, ‘cd’, ‘gh’)
D) error
298.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘abcd’.partition(‘cd’))
A) (‘ab’, ‘cd’, “) ✔️
B) (‘ab’, ‘cd’)
C) error
D) None of the mentioned
299.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘cd’.partition(‘cd’))
A) (‘cd’)
B) (“)
C) (‘cd’, “, “)
D) (“, ‘cd’, “) ✔️
300.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
print(‘abef’.partition(‘cd’))
A) (‘abef’)
B) (‘abef’, ‘cd’, “)
C) (‘abef’, “, “) ✔️
D) error
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
sir I want to mcq pdf in python.
this help for paper of nielet exam.