wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

AI Internal Lab Practical

Total questions: 22

Worksheet time: 11mins

Name
Class
Date
1.

What data structure is primarily used in Breadth First Search traversal?

a)

Stack

b)

Queue

c)

Heap

d)

Tree

2.

The Water Jug Problem is an example of which type of AI problem?

a)

Optimization

b)

Search

c)

Classification

d)

Regression

3.

Which Python module is commonly used to remove punctuation from strings?

a)

string

b)

re

c)

nltk

d)

os

4.

Which Python function is used to get user input in a Hangman game?

a)

print()

b)

input()

c)

eval()

d)

str()

5.

Which stemmer is provided by NLTK for stemming English words?

a)

WordNetLemmatizer

b)

PorterStemmer

c)

LancasterStemmer

d)

SnowballStemmer

6.

What function is used in NLTK for POS tagging?

a)

pos_tag()

b)

tag_pos()

c)

get_tags()

d)

tag_words()

7.

What is required for lemmatization to work correctly in NLTK?

a)

POS tags

b)

Stop words

c)

Stems

d)

Token length

8.

Which classifier is commonly used in NLTK for text classification?

a)

DecisionTreeClassifier

b)

NaiveBayesClassifier

c)

RandomForestClassifier

d)

SVMClassifier

9.

What data structure is used in DFS traversal?

a)

Queue

b)

Stack

c)

Heap

d)

Graph

10.

What does the A* algorithm combine to find the optimal path?

a)

BFS and DFS

b)

Cost and heuristic

c)

Random and greedy search

d)

Depth and breadth

11.

Which of the following is true about DFS compared to BFS?

a)

DFS always finds the shortest path

b)

DFS uses more memory than BFS

c)

DFS may get stuck in an infinite loop without visited tracking

d)

DFS is slower than BFS in all cases

12.

In the Water Jug Problem, a state is typically represented as:

a)

A single integer

b)

A tuple of two integers

c)

A string

d)

A graph node

13.

What happens when sorting a list of words with mixed case in Python?

a)

Lowercase words come first

b)

Uppercase words come first

c)

It raises an error

d)

Words are sorted by length

14.

In Hangman, the game ends when:

a)

The word is guessed or attempts run out

b)

The player presses Enter

c)

The player guesses a vowel

d)

The player types 'exit'

15.

How is a win typically checked in a Tic-Tac-Toe game?

a)

By checking all diagonals only

b)

By checking rows, columns, and diagonals

c)

By counting total moves

d)

By checking the center cell

16.

How can you add custom stop words in NLTK?

a)

Modify the corpus directly

b)

Append to the stopwords list

c)

Use stopwords.add()

d)

Use stopwords.update()

17.

What is the key difference between stemming and lemmatization?

a)

Stemming is slower

b)

Lemmatization uses a dictionary

c)

Stemming is more accurate

d)

Lemmatization removes stop words

18.

What is the output format of nltk.pos_tag()?

a)

List of strings

b)

Dictionary

c)

List of tuples

d)

Set of tags

19.

Which NLTK tool is used for lemmatization?

a)

WordNetLemmatizer

b)

PorterStemmer

c)

StopWordsRemover

d)

POSClassifier

20.

What is the first step in text classification?

a)

Model training

b)

Feature extraction

c)

Evaluation

d)

Tokenization

21.

What is a common way to implement DFS in Python?

a)

Using a queue

b)

Using recursion

c)

Using a dictionary

d)

Using a heap

22.

What is the role of the heuristic function in A*?

a)

To calculate path cost

b)

To estimate distance to goal

c)

To sort the queue

d)

To detect cycles