wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python MCQ Challenge

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

SNS Engineering College maintains a list of student roll numbers. To check if roll number 2025 exists, which search is more efficient if the list is already sorted?

a)

Linear Search

b)

Binary Search

c)

Random Search

d)

Hash Search

2.

You have a Python list of Tamil movies:

movies = ["Vikram", "Leo", "Jailer", "Master", "Beast"]

If you want to check whether "Leo" is present, which searching technique is most suitable for an unsorted list?

a)

Binary Search

b)

Linear Search

c)

Interpolation Search

d)

Hash Search

3.

In a cricket match scorecard, player scores are stored in sorted order:

scores = [15, 22, 35, 50, 60, 72, 85, 100]

Which search will find score = 72 faster?

a)

Linear Search

b)

Binary Search

c)

Random Guessing

d)

Sequential Check

4.

Coimbatore colleges are stored in a list:

colleges = ["PSG", "KCT", "SNS", "SKCET", "Sri Krishna"]

Which Python statement is best for searching "SNS" directly?

a)

"SNS" in colleges

b)

colleges.index("SNS")

c)

Both a and b

d)

None

5.

If a movie ticket booking system uses binary search, what condition must be true for the movie seat numbers list?

a)

List must be sorted

b)

List must be unsorted

c)

List must have unique values

d)

List must contain only integers

6.

players = ["Dhoni", "Kohli", "Raina", "Rohit", "Jadeja"]

name = "Kohli"

for i in range(len(players)):

if players[i] == name:

print("Found at", i)

What type of search is implemented?

a)

Binary Search

b)

Linear Search

c)

Jump Search

d)

Hashing

7.

In Anna University results portal, students search their register number. If register numbers are stored in a sorted list, which algorithm reduces search time from O(n) to O(log n)?

a)

Linear Search

b)

Binary Search

c)

Bubble Sort

d)

Quick Search

8.

In IPL cricket, searching for "CSK" in a team list:

teams = ["MI", "CSK", "RCB", "KKR", "SRH"]

Which Python function directly gives index of "CSK"?

a)

teams.find("CSK")

b)

teams.index("CSK")

c)
d)

teams.get("CSK")

9.

Which scenario best fits linear search in Python?

a)

Finding a movie in an unsorted movie list

b)

Finding student rank from a sorted rank list

c)

Searching roll number in binary tree

d)

Searching books in a hash table

10.

Tamil Nadu bus seat numbers are stored sorted as:

seats = [1, 2, 3, 4, 5, 6, 7, 8]

If you apply binary search for seat 6, how many maximum comparisons?

a)

1

b)

2

c)

3

d)

8

11.

arr = [10, 20, 30, 40, 50]

x = 40

low, high = 0, len(arr)-1

while low <= high:

mid = (low+high)//2

if arr[mid] == x:

print("Found")

break

elif arr[mid] < x:

low = mid+1

else:

high = mid-1

Which algorithm is this?

a)

Linear Search

b)

Binary Search

c)

Hash Search

d)

Jump Search

12.

SNS Engineering library database stores unsorted book IDs. A student searches for ID 145. Which search is most suitable?

a)

Linear Search

b)

Binary Search

c)

Fibonacci Search

d)

Jump Search

13.

In a cricket team, players’ names are unsorted. Searching for "Dhoni" in Python with:

if "Dhoni" in players:

print("Found")

What is the time complexity?

a)

O(1)

b)

O(log n)

c)

O(n)

d)

O(n log n)

14.

If students = [101, 102, 103, 104, 105], then students.index(104) will return:

a)

103

b)

104

c)

3

d)

Error

15.

A cinema theatre booking system stores seat numbers sorted from 1–500. To find seat 250, which is fastest?

a)

Linear Search

b)

Binary Search

c)

Sequential Search

d)

Random Guess