Skip to content

Category Archives: Python-Quizzes

Question 9: What is the output of the following program? A = {0, 2, 4, 6, 8};  B = {1, 2, 3, 4, 5};    … Read More
Question 8: What is the output of the following program? A = {0, 2, 4, 6, 8};  B = {1, 2, 3, 4, 5};    … Read More
Question 7: What is the output of the following program? A = {0, 2, 4, 6, 8};  B = {1, 2, 3, 4, 5};    … Read More
Question 6: What is the output of the following program? A = {0, 2, 4, 6, 8};  B = {1, 2, 3, 4, 5};    … Read More
Question 5: What is the output of the following program? set1 = {1, 2, 3}  set2 = {4, 5, 6}  print(len(set1 + set2))  (A) 3… Read More
Question 4: What is the output of the following program? set1 = {1, 2, 3}  set2 = set1.add(4)  print(set2)  (A) {1, 2, 3, 4} (B)… Read More
Question 3: What is the output of the following program? set1 = {1, 2, 3}  set2 = set1.copy()  set2.add(4)  print(set1)  (A) {1, 2, 3, 4}… Read More
Question 2: What is the output of the following program? sets = {3, 4, 5}  sets.update([1, 2, 3])  print(sets)  (A) {1, 2, 3, 4, 5}… Read More
Question 1: What is the output of the following program? sets = {1, 2, 3, 4, 4}  print(sets)  (A) {1, 2, 3} (B) {1, 2,… Read More
Question 19: What is the output of the following program? a = "This is a string" print(a.count("i")) (A) 1 (B) 2 (C) 3 (D) 4… Read More
Question 18: What is the output of the following program? a = "This is a string" print a  (A) This is a string (B) a… Read More
Question 17: What is the output of the following program? def gfgFunction():      "Geeksforgeeks is cool website for boosting up technical skills"     return 1    print… Read More
Question 16: What is the output of the following program? a = "GeeksforGeeks "    b = 13    print (a + b)  (A) GeeksforGeeks13… Read More
Question 15: What is the output of the following program? print ('\x25\x26') (A) \x25\x26 (B) ‘\x25\x26’ (C) %& (D) &% Answer: (C) Explanation: In the… Read More
Question 14: What is the output of the following program? print (r'C:\\inside C directory') (A) C:\inside C directory (B) C:\\inside C directory (C) inside C… Read More