## Disclaimer for ReGyan

If you require any more information or you have any problem regarding Copyright or have any questions about our site’s disclaimer, please feel free to contact us by email at hello@regyan.com.

### Disclaimers for ReGyan

All the information on this website is published in good faith and for general information and educational purpose only. ReGyan 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 (regyan.com), is strictly at your own risk. will not be liable for any losses and/or damages in connection with the use of our website.

Python programming quiz week 10 answer is given below.

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

**1. **O(1)

**2. **O(log n)

**3. **O(n)

**4. **O(n/2)

**Also See:- Computer Science and Engineering Junior Research Fellowship 2020**

**Answer:- 1. O(1)**

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

**1. **True

**2. **False

**Answer:- True**

**Q:3.** Which is incorrect in case of tower of hanoi

**1. **It consists of three rods

**2. **Only one disk can move at a time

**3. **any disk can be moved on to any one

**4. **None of the above

**Answer:- 3. any disk can be moved on to any one**

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

**1. **29

**2. **30

**3. **31

**4. **32

**Answer:- 3. 31**

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

**1. **Best case complexity

**2. **worst case complexity

**3. **Both 1 and 2

**4. **None of the above

**Answer:- 2. worst case complexity**

**Q:6.** How many swaps will be performed in selection sort in best case:-

**1. **zero

**2. **one

**3. **n-1

**4. **n

**Answer:- 1. zero**

**Q:7.** Worst case compexity of merge sort is :-

**1. **O(n log n)

**2. **O(log n)

**3. **O(n**2)

**4. **O(log-1)

**Answer:- 1. O(n log n)**

**Q:8.** What is true for merge sort:-

**1. **Merge sort is divide and conquer algorithm

**2. **Unsorted array is divided into smaller subarrays untill each subarrays has only one element

**3. **Atomic subarrays are the base case for merge sort

**4. **All of the above

**Answer:- 4. All of the above**

**Q:9.** Which of the following is false for binary search algorithm :-

**1. **Array must be in sorted order

**2. **Search is performed by repetedly dividing search interval into half

**3. **If there are two or more numbers equals to the search item, either can be true depending on implementation

**4. **Its best case complexity is O(log n)

**Answer:- 4. Its best case complexity is O(log n)**

**Also See:- Central Sector Scholarship 2019-20 For College & University**

**Q:10.** In recursion,

**1. **Absence of base condition can cause infinite loop

**2. **There can be more than one base cases

**3. **Both 1 and 2

**4. **None of the above

**Answer:- 3. Both 1 and 2**

**Q:11.** In recursion ,

**1. **Debugging of the code is more difficult

**2. **Code is always efficient compare to iterative approach of the same

**3. **Both 1 and 2

**4. **None of the above

**Answer:- 3. Both 1 and 2**

**Q:12.** In tower of hanoi if there are only two disks, then

**1. **2 steps are required to solve it.

**2. **3 steps are required to solve it.

**3. **Problem can not be solved

**4. **None of the above

**Answer:- 2. 3 steps are required to solve it.**

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

**1. **True

**2. **False

**Answer:- 1. True**

**Q:14.** Which of the following is false for selection sort

**1. **It is a in place sorting algorithm

**2. **Smallest element is searched in the unsorted array

**3. **It is suitable for large data sets

**4. **All of the above

**Answer:- 3. It is suitable for large data sets**

**Q:15.** Merge sort was invented by John von Neumann in 1947

**1. **True

**2. **False

**Answer:- 2. False**

That’s all for the Python programming quiz week 10 answer. if you have any questions, please comment down below, we will try to answer with in the first 24 hours. I hope you liked this content.

Q:3. Which is incorrect in case of tower of hanoi

1. It consists of three rods

2. Only one disk can move at a time

3. any disk can be moved on to any one

4. None of the above

Ans should be 3. Any disk can be moved to any one

As incorrect ,only those disk are allowed which are smaller than the existing disk present in the moving rod

read questions carefully

answer is right

Admin, actually u r wrong. Only smaller disks are allowed on existing disks not any disk

Which question

Have a look on question 3

ok

Then what will the right answer for this question

Quickly answer this question please.

the answer is already updated

sir whaat is the ans. of this question.

Which is incorrect in case of tower of hanoi

1. It consists of three rods

2. Only one disk can move at a time

3. any disk can be moved on to any one

4. None of the above

Which function is used to get rid of the blank spaces on the left?

A. Strip()

B. Left()

C.rstrip()

D. Istrip()

How is a line or a group of lines related to the rest of the program?

A. Square brackets

B.indentation

C.braces

D.parentheses

If statement along with an else statement in python is called________statement.

A.elif

B.elseif

C.elsif

D.ifelse

In recurison

A.absence of base conditioncan cause infinite loop

B. Ther can be more than one base cases.

C.both a and b.

D. None of the above .

The readlines()method returns____________

A. Str

B.a list of lines

C. A list of single characters

D. A list of integers

https://regyan.com/python-programming-special-quiz-answer-2020/

Sir please give the answers of my questions

you will get your all questions from here

https://regyan.com/python-programming-special-quiz-answer-2020/