Search Header Logo

set - 12

Authored by Viswas MCV

Computers

University

Used 1+ times

set - 12
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the below function return ?

arr=[1,2,3,4,5]

def search(arr): 

    for i in range(len(arr)):

        if arr[i] = 3:

            return i

    return -1

2

4

0

Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of following python code

t=(3,4)

print(2*t)

[3,3,4,4]

(3,4,3,4)

[3,4,4,3]

(3,3,4,4)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code

d1={"a":5,"b":60}

d2={"a":60,"b":5}

print(d1>d2)

False

True

Error

None of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A datatype which has unique values and is immutable ?

tuple

set

frozenset

Dictionary

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true

Recursion is always better than iteration

Iteration is always better and simpler than recursion

Recursion uses less memory compared to iteration

Recursion uses more memory compared to iteration

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which sorting algorithm does python inbuilt sort function use ?

Merge Sort

Insertion Sort

Combination of merge and insertion sort

bucket sort

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which searching algorithm works best for the following array

arr = [17,25,10,9,36,12]

Linear Search

Binary Search

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers