python week 10 quiz solutions 2020,python programming week 10 solutions
Python Week 10 Quiz Solutions 

Python Week 10 Quiz Solutions

Disclaimer for News Pustak

If you require any more information or you have any problems regarding copyright or have any questions about our site’s disclaimer, please feel free to contact us by email at

Disclaimer for News Pustak

All the information on the website is published in good faith and for general information and educational purpose only. News Pustak does not make any warranties about the completeness, reliability, and accuracy of this information. Any action you take upon the information you find on this website is strictly at your own risk. We will not be liable for any losses and/or damage in connection with the use of our website.

Python Week 10 Quiz Solutions

1. In a binary search algorithm, Which is the best case scenario:-

  • (a): O(1)
  • (b): O(log n)
  • (c): O(n)
  • (d): O(n/2)

Answer: (a) O(1)

2. O(1) is best case performance of binary search

  • (a): True
  • (b): False
Answer:(a) True

3. Which is incorrect in case of tower of hanoi

  • (a): It Consists of three rods
  • (b): Only one disk can move at a time
  • (c): any disk disk can be moved on to any one
  • (d): Non of the above

Also GetWant Automata (TAFL) Notes

Answer:(d) None of the above

4. How many steps does it take to complete tower of hanoi, if there are 5 disks : -

  • (a): 29
  • (b): 30
  • (c): 31 
  • (d): 32
Answer: (c) 31

5.  In case of selection sort, O(n(square)) is : - 

  • (a): Best Case complexity
  • (b):  worst Case complexity
  • (c): Both 1 and 2
  • (d): None of the above
Answer: (c) Both 1 and 2

6.  How Many swaps will be performed in selection sort in best case : - 

  • (a): Zero
  • (b): one
  • (c): n-1
  • (d): n
Answer: (a)  Zero

7. Worst case compexity of merge sort is

  • (a): O(n log n)
  • (b): O(log n)
  • (c): O(n**2)
  • (d): O(log-1)

Also Get : Want Opreating System Quantum Series

Answer: (a) O(n log n)

8. What is true for merge sort 

Answer: (d)  All of the above 

9. Which of the following is false for binary search algorithm –

Answer: (A)  Array must be in sorted order

10. In recursion,

Answer: (c)  Both 1 and 2

11. In recursion,

Answer: (b) Code is always efficient compare to iterative approach of the same.

12. In tower of hanoi if there are only two disks, then –

Answer: (b)  Three steps required to solve it

13. In tower of hanoi, larger disk will be always at the bottom of the rod

  • (a): True
  • (b): False
Answer: (a) True

14. Which of the following is false for selection sort

Answer: (c)  It is suitable for large data sets

15.  Merge sort was invented by John von Neumann in 1947 –

Answer: (b) False

So, that's it for today wait for next week python quiz week 11.we we'll update here , Stay Connected. Thankyou.
Previous Post Next Post