NIELIT M3-R5 Python MCQ Online Test
211.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“xyyzxyzxzxyy”.count(‘yy’, 2))
A) 2
B) 0
C) 1 ✔️
D) None of the mentioned
212.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“xyyzxyzxzxyy”.count(‘xyy’, 0, 100))
A) 2 ✔️
B) 0
C) 1
D) error
213.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“xyyzxyzxzxyy”.count(‘xyy’, 2, 11))
A) 2
B) 0 ✔️
C) 1
D) error
214.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“xyyzxyzxzxyy”.count(‘xyy’, -10, -1))
A) 2
B) 0 ✔️
C) 1
D) error
215.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘abc’.encode())
A) abc
B) ‘abc’
C) b’abc’ ✔️
D) h’abc’
216.What is the default value of encoding in encode()?
एन्कोडिंग () में एन्कोडिंग का डिफ़ॉल्ट मान क्या है?
A) ascii
B) qwerty
C) utf-8 ✔️
D) utf-16
217.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“xyyzxyzxzxyy”.endswith(“xyy”))
A) 1
B) True ✔️
C) 3
D) 2
218.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“xyyzxyzxzxyy”.endswith(“xyy”, 0, 2))
A) 0
B) 1
C) True
D) False ✔️
219.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“ab\tcd\tef”.expandtabs())
A) ab cd ef ✔️
B) abcdef
C) ab\tcd\tef
D) ab cd ef
220.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“ab\tcd\tef”.expandtabs(4))
A) ab cd ef
B) abcdef
C) ab\tcd\tef
D) ab cd ef ✔️
221.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“ab\tcd\tef”.expandtabs(‘+’))
A) ab+cd+ef
B) ab++++++++cd++++++++ef
C) ab cd ef
D) None of the mentioned ✔️
222.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“abcdef”.find(“cd”) == “cd” in “abcdef”)
A) True
B) False ✔️
C) Error
D) None of the mentioned
223.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“abcdef”.find(“cd”))
A) True
B) 2 ✔️
C) 3
D) None of the mentioned
224.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“ccdcddcd”.find(“c”))
A) 4
B) 0 ✔️
C) Error
D) True
225.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 {0} and {1} foo bin
C) Error
D) Hello 0 and 1
226.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
class Count:
def __init__(self, count = 0):
self.__count = count
c1 = Count(2)
c2 = Count(2)
print(id(c1) == id(c2), end = ” “)
s1 = “Good”
s2 = “Good”
print(id(s1) == id(s2))
A) True False
B) True True
C) False True ✔️
D) False False
227.What function do you use to read a string?
एक स्ट्रिंग को पढ़ने के लिए आप किस फ़ंक्शन का उपयोग करते हैं?
A) input(“Enter a string”) ✔️
B) eval(input(“Enter a string”))
C) enter(“Enter a string”)
D) eval(enter(“Enter a string”))
228.Suppose x is 345.3546, what is format(x, “10.3f”) (_ indicates space).
मान लीजिए कि x 345.3546 है, प्रारूप क्या है (x, “10.3f”) (_ अंतरिक्ष इंगित करता है)।
A) __345.355
B) ___345.355 ✔️
C) ____345.355
D) _____345.354
229.What will be the output of the following Python code?
print(“abc DEF”.capitalize())
A) abc def
B) ABC DEF
C) Abc def ✔️
D) Abc Def
230.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“abc. DEF”.capitalize())
A) abc. def
B) ABC. DEF
C) Abc. Def ✔️
D) Abc. Def
231.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“abcdef”.center())
A) cd
B) abcdef
C) error ✔️
D) None of the mentioned
232.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“abcdef”.center(0))
A) cd
B) abcdef ✔️
C) error
D) none of the mentioned
233.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘*’, “abcdef”.center(7), ‘*’)
A) * abcdef *
B) * abcdef * ✔️
C) *abcdef *
D) * abcdef*
234.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘*’, “abcdef”.center(7), ‘*’, sep=”)
A) * abcdef *
B) * abcdef *
C) *abcdef *
D) * abcdef* ✔️
235.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(‘*’, “abcde”.center(6), ‘*’, sep=”)
A) * abcde *
B) * abcde *
C) *abcde * ✔️
D) * abcde*
236.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“abcdef”.center(7, 1))
A) 1abcdef
B) abcdef1
C) abcdef
D) error ✔️
237.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“abcdef”.center(7, ‘1’))
A) 1abcdef ✔️
B) abcdef1
C) abcdef
D) error
238.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“abcdef”.center(10, ’12’))
A) 12abcdef12
B) abcdef1212
C) 1212abcdef
D) error ✔️
239.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“xyyzxyzxzxyy”.count(‘yy’))
A) 2 ✔️
B) 0
C) error
D) None of the mentioned
240.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(“xyyzxyzxzxyy”.count(‘yy’, 1))
A) 2 ✔️
B) 0
C) 1
D) None of the mentioned
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