Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Question 4: What is the output of the following program?line = "What will have so will"L = line.split('a')for i in L:print(i, end=' ')(A) [‘What’, ‘will’, ‘have’, ‘so’, ‘will’](B) Wh t will h ve so will(C) What will have so will(D) [‘Wh’, ‘t will h’, ‘ve so will’]

Answer»
2.

Question 1: What is the output of the following program?str1 = '{2}, {1} and {0}'.format('a', 'b', 'c')str2 = '{0}{1}{0}'.format('abra', 'cad')print(str1, str2)(A) c, b and a abracad0(B) a, b and c abracadabra(C) a, b and c abracadcad(D) c, b and a abracadabra

Answer»
3.

Question 3: What is the output of the following program?line = "I'll come by then."eline = ""for i in line:eline += chr(ord(i)+3)print(eline)(A) L*oo frph e| wkhq1(B) L*oo#frph#e|#wkhq1(C) l*oofrphe|$wkhq1(D) O*oo#Frph#E|#wKhq1

Answer»
4.

Question 2: What is the output of the following program?a = 2b = '3.77'c = -8str1 = '{0:.4f} {0:3d} {2} {1}'.format(a, b, c)print(str1)(A) 2.0000 2 -8 3.77(B) 2 3.77 -8 3.77(C) 2.000 3 -8 3.77(D) 2.000 2 8 3.77

Answer»
5.

Question 16: What is the output of the following program?a = "GeeksforGeeks "b = 13print (a + b)(A) GeeksforGeeks13(B) 13GeeksforGeeks(C) GeeksforGeeks(D) Error

Answer»