Multiple choice Questions: 1. Arranging elements of an array or a list in an order is known as ________. (a) Searching (b) Sorting (c) Merging (d) Arranging Arranging elements of an array or a list in an order is known as Sorting. Answer: (b) Sorting 2. Which of the following are sorting algorithms? (a) Insertion (b) BFS (c) round robin (d) Bubble Insertion and Bubble are both standard sorting algorithms. Since only one option can be chosen and both (a) and (d) are correct, and they appear in separate options, there might be an error in the question structure or a missing option that includes both. However, since the question later specifically asks about Bubble and Insertion sort, we will assume the intended answers are those that are sorting algorithms. Answer: Both (a) Insertion and (d) Bubble are correct sorting algorithms. 3.How many passes does an insertion sort alg...
Section A: Multiple Choice Questions (1 Mark Each) (Total Marks: 5) 1.Which of the following is an entry-controlled loop in Python? a) for loop b) while loop c) do-while loop d) Both a and b 2.What is the output of the following code snippet? i = 1 while i < 5: print(i, end=' ') i += 1 a) 1 2 3 4 b) 1 2 3 4 5 c) 1 2 3 d) 1 2 3 4 5 3.Which statement is used to exit from a loop prematurely? a) continue b) pass c) break d) exit 4.In a Python if-elif-else ladder, how many elif blocks can there be? a) One b) Zero or one c) Zero or more d) Only two 5.What will be the value of x after the following code is executed? x = 10 if x > 5: x = x + 5 elif x < 15: x = x + 10 else: x = x - 5 a) 15 b) 20 c) 5 d) 10 Section B: Short Answer Questions (2 Marks Each) (Total Marks: 10) 1.Differentiate between the break and continue statements in Python with a suitable example for each. 2.Explain the purpose of the pas...