NEW
Font size
WorksheetsAI Internal Lab Practical
Total questions: 22
Worksheet time: 11mins
What data structure is primarily used in Breadth First Search traversal?
Stack
Queue
Heap
Tree
The Water Jug Problem is an example of which type of AI problem?
Optimization
Search
Classification
Regression
Which Python module is commonly used to remove punctuation from strings?
string
re
nltk
os
Which Python function is used to get user input in a Hangman game?
print()
input()
eval()
str()
Which stemmer is provided by NLTK for stemming English words?
WordNetLemmatizer
PorterStemmer
LancasterStemmer
SnowballStemmer
What function is used in NLTK for POS tagging?
pos_tag()
tag_pos()
get_tags()
tag_words()
What is required for lemmatization to work correctly in NLTK?
POS tags
Stop words
Stems
Token length
Which classifier is commonly used in NLTK for text classification?
DecisionTreeClassifier
NaiveBayesClassifier
RandomForestClassifier
SVMClassifier
What data structure is used in DFS traversal?
Queue
Stack
Heap
Graph
What does the A* algorithm combine to find the optimal path?
BFS and DFS
Cost and heuristic
Random and greedy search
Depth and breadth
Which of the following is true about DFS compared to BFS?
DFS always finds the shortest path
DFS uses more memory than BFS
DFS may get stuck in an infinite loop without visited tracking
DFS is slower than BFS in all cases
In the Water Jug Problem, a state is typically represented as:
A single integer
A tuple of two integers
A string
A graph node
What happens when sorting a list of words with mixed case in Python?
Lowercase words come first
Uppercase words come first
It raises an error
Words are sorted by length
In Hangman, the game ends when:
The word is guessed or attempts run out
The player presses Enter
The player guesses a vowel
The player types 'exit'
How is a win typically checked in a Tic-Tac-Toe game?
By checking all diagonals only
By checking rows, columns, and diagonals
By counting total moves
By checking the center cell
How can you add custom stop words in NLTK?
Modify the corpus directly
Append to the stopwords list
Use stopwords.add()
Use stopwords.update()
What is the key difference between stemming and lemmatization?
Stemming is slower
Lemmatization uses a dictionary
Stemming is more accurate
Lemmatization removes stop words
What is the output format of nltk.pos_tag()?
List of strings
Dictionary
List of tuples
Set of tags
Which NLTK tool is used for lemmatization?
WordNetLemmatizer
PorterStemmer
StopWordsRemover
POSClassifier
What is the first step in text classification?
Model training
Feature extraction
Evaluation
Tokenization
What is a common way to implement DFS in Python?
Using a queue
Using recursion
Using a dictionary
Using a heap
What is the role of the heuristic function in A*?
To calculate path cost
To estimate distance to goal
To sort the queue
To detect cycles
