wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Multiple Choice Questions on Programming and NLP

Total questions: 83

Worksheet time: 42mins

Name
Class
Date
1.

What is a variable in Python?

a)

A reusable block of code

b)

A container for storing data values

c)

A grammatical structure

d)

A pointer to another node

2.

Which data type in Python is immutable?

a)

List

b)

Dictionary

c)

Tuple

d)

Set

3.

What does controlflow in Python refer to?

a)

Defining classes and objects

b)

Conditional statements and loops

c)

Storing data in nodes

d)

Analyzing sentence meaning

4.

In Python, what is a function?

a)

A data structure for links

b)

A reusable block of code

c)

A lexical database

d)

An AI model for chatbots

5.

What is Object-Oriented Programming (OOP) in Python?

a)

Breaking text into tokens

b)

Using classes and objects

c)

Traversing nodes

d)

Sentiment analysis

6.

Why are nodes used in Python?

a)

For continuous memory allocation

b)

As foundations for data structures like linked lists and trees

c)

To process natural language

d)

For rule-based chatbots

7.

What does a node store along with data?

a)

Grammatical rules

b)

Address of the next location

c)

User intents

d)

Sentiment scores

8.

In the context of nodes, what is a pointer?

a)

A lexical unit

b)

The address of the next data element

c)

A chatbot response

d)

A Python variable

9.

How are nodes created in Python?

a)

Using loops only

b)

By implementing a class

c)

Through syntactic analysis

d)

Via sentiment extraction

10.

In the example given, what is the class name for holding weekdays?

a)

Weekdays

b)

Daynames

c)

Nodes

d)

Pointers

11.

What is initialized to null in node creation?

a)

Data element

b)

Nextval pointer

c)

Class name

d)

Traverse variable

12.

How do you traverse node elements?

a)

Using if/then rules

b)

Assign first element to a variable and use a while loop with nextval

c)

Breaking into lexemes

d)

Analyzing semantics

13.

What is Natural Language Processing (NLP)?

a)

A way to allocate memory

b)

A branch of AI focusing on human-computer interaction through language

c)

Defining Python functions

d)

Creating nodes

14.

What is the objective of NLP?

a)

To store data in nodes

b)

To program computers to process and analyze natural language data

c)

To build rule-based chatbots only

d)

To traverse pointers

15.

What does syntax in NLP pertain to?

a)

Meaning of words

b)

Arrangement of words and phrases for well-structured sentences

c)

Context and intent

d)

Data storage in classes

16.

In the syntax example, what is analyzed in "The cat sat on the mat"?

a)

Speakers intent

b)

Grammatical structure and rules

c)

Word meanings

d)

Node links

17.

What is semantics in NLP concerned with?

a)

Grammatical arrangement

b)

Understanding the meaning of words and sentences

c)

Memory allocation

d)

Traversing elements

18.

In the semantics example, what does it distinguish in "The panda eats shoots and leaves"?

a)

Grammatical errors

b)

Whether it’s about eating plants or a violent act

c)

Node pointers

d)

Chatbot types

19.

What does pragmatics in NLP deal with?

a)

Breaking text into tokens

b)

Understanding language in contexts based on situation and intent

c)

Defining classes

d)

Storing weekdays

20.

In the pragmatics example, how is "Can you pass the salt?" interpreted?

a)

As a question about ability

b)

As a request in dining context

c)

As a grammatical check

d)

As a node traversal

21.

What is the first phase of NLP?

a)

Semantic Analysis

b)

Lexical Analysis and Morphological

c)

Discourse Integration

d)

Pragmatic Analysis

22.

What does Lexical Analysis do in NLP phases?

a)

Checks grammar

b)

Scans text into meaningful lexemes, divides into paragraphs, sentences, words

c)

Focuses on meaning

d)

Interprets intents

23.

What is Syntactic Analysis also known as?

a)

Parsing

b)

Tokenizing

c)

Traversing

d)

Fulfilling

24.

What does Syntactic Analysis check?

a)

Literal meanings

b)

Grammar, word arrangements, relationships among words

c)

Contexts

d)

Node pointers

25.

What is the focus of Semantic Analysis in NLP?

a)

Grammatical structure

b)

Literal meaning of words, phrases, sentences

c)

Cooperative dialogues

d)

Memory blocks

26.

What does Discourse Integration depend on?

a)

Previous and following sentences

b)

Node classes

c)

Python variables

d)

Chatbot UI

27.

In Pragmatic Analysis, how is "Open the door" interpreted?

a)

As an order

b)

As a request

c)

As a question

d)

As a statement

28.

What is a chatbot?

a)

A memory allocation tool

b)

A software application to simulate human conversation

c)

A Python data type

d)

A lexical database

29.

How can chatbots be implemented?

a)

Using nodes only

b)

Using NLP techniques and AI models

c)

Through pointers

d)

Via controlflow

30.

What are the two main types of chatbots?

a)

Syntax and Semantics

b)

Rule-based and AI-based

c)

Nodes and Pointers

d)

Intents and Entities

31.

What do rule-based chatbots use?

a)

Machine learning

b)

Predefined rules for responding

c)

Deep learning only

d)

Sentiment analysis

32.

What do modern chatbots increasingly use?

a)

Memory blocks

b)

Conversational AI techniques like NLP

c)

Python lists

d)

Node traversal

33.

Rule-based chatbots are compared to what?

a)

Movie actors sticking to the script

b)

AI models learning data

c)

Lexical analyzers

d)

Semantic parsers

34.

How do rule-based chatbots provide answers?

a)

Based on machine learning

b)

Based on if/then rules defined by designer

c)

Through node links

d)

Via pragmatic rules

35.

What can AI-based chatbots do better than rule-based?

a)

Stick to scripts

b)

Freely communicate using ML, NLP, deep learning

c)

Allocate memory

d)

Define classes

36.

What technologies do AI chatbots leverage?

a)

Pointers and nodes

b)

Machine learning, NLP, sentiment analysis

c)

Variables and loops

d)

Syntax only

37.

What can AI agents analyze?

a)

Node elements

b)

Vast amounts of data to provide unique answers

c)

Python functions

d)

Grammatical rules

38.

What is part of general chatbot architecture?

a)

Node creation

b)

User Interface (UI) for interaction

c)

Lexical knowledge

d)

Pointer initialization

39.

What does the Bot Engine do?

a)

Stores data

b)

Processes input and generates responses

c)

Traverses nodes

d)

Analyzes semantics

40.

What is stored in a chatbot’s Database?

a)

Python code

b)

Conversation history, user preferences

c)

WordNet synonyms

d)

Verb classifications

41.

In which application is a chatbot used?

a)

Memory allocation

b)

Customer support

c)

Node traversal

d)

OOP definition

42.

What is an Intent in chatbots?

a)

A data type

b)

The purpose or goal of the users message

c)

A pointer

d)

A lexical token

43.

What are chatbots?

a)

A data type

b)

The purpose or goal of the users message

c)

A pointer

d)

A lexical token

44.

What are Entities?

a)

Reusable code blocks

b)

Specific pieces of information within an intent

c)

Grammatical categories

d)

Node classes

45.

What are Utterances?

a)

Pointer addresses

b)

Variations of how a user might phrase a message

c)

AI models

d)

Syntax rules

46.

What is an utterance typically bounded by?

a)

Memory blocks

b)

Pauses in speech or sentence boundaries in text

c)

Node links

d)

If/then rules

47.

What are Variables used for in chatbots?

a)

To traverse elements

b)

To store information extracted from user inputs

c)

To define classes

d)

To parse sentences

48.

What is Fulfillment in chatbots?

a)

Breaking into tokens

b)

Executing actions or responding based on intent and information

c)

Allocating memory

d)

Initializing pointers

49.

What does Lexical Analysis involve?

a)

Understanding contexts

b)

Breaking text into tokens like words, punctuation

c)

Defining functions

d)

Creating nodes

50.

What is the purpose of Lexical Analysis?

a)

To store weekdays

b)

For understanding the structure and meaning of text

c)

To simulate conversations

d)

To link nodes

51.

What is WordNet?

a)

A chatbot type

b)

A lexical database grouping words into synonyms and relationships

c)

A Python data structure

d)

A phase of NLP

52.

What does VerbNet provide?

a)

Sentiment scores

b)

Classification of English verbs based on syntactic and semantic behavior

c)

Node pointers

d)

User interfaces

53.

What is PropBank?

a)

A memory tool

b)

A corpus annotated with predicate-argument structures

c)

A rule-based chatbot

d)

A traversal method

54.

What is Part-of-Speech (POS) Tagging?

a)

Linking nodes

b)

Classifying words into grammatical categories like nouns, verbs

c)

Generating responses

d)

Allocating memory

55.

What does POS Tagging help with?

a)

Memory storage

b)

Understanding sentence structure and meaning

c)

Defining intents

d)

Initializing null pointers

56.

What is Parsing in NLP?

a)

Storing data

b)

Analyzing grammatical structure of sentences

c)

Traversing weekdays

d)

Simulating chat

57.

What does Semantic Analysis resolve?

a)

Pointer addresses

b)

Ambiguities like word sense disambiguation

c)

User preferences

d)

If/then rules

58.

What is Information Extraction (IE)?

a)

Creating classes

b)

Extracting structured information from unstructured text

c)

Defining functions

d)

Linking elements

59.

What does Sentiment Analysis identify?

a)

Node values

b)

Opinions in text as positive, negative, neutral

c)

Python variables

d)

Chatbot UIs

60.

In nodes, what allows traversal from one to another?

a)

Grammatical rules

b)

Links via pointers

c)

AI models

d)

Lexemes

61.

Why can’t memory always be continuous?

a)

Due to NLP phases

b)

Situations require pointers and nodes

c)

Chatbot designs

d)

Python functions

62.

What is nextval in the node example?

a)

A data type

b)

A pointer to the next node

c)

An intent

d)

A utterance

63.

How are node elements printed?

a)

Using semantic analysis

b)

While loop and nextval pointer

c)

Rule-based responses

d)

Database storage

64.

What sequence is achieved in node traversal example?

a)

Random days

b)

Days of the week in proper sequence

c)

NLP components

d)

Chatbot types

65.

NLP focuses on interaction between what?

a)

Nodes and pointers

b)

Computers and humans through natural language

c)

Variables and functions

d)

Intents and entities

66.

Syntax ensures adherence to what?

a)

Meanings

b)

Grammatical rules like subject-verb agreement

c)

Contexts

d)

Data links

67.

Semantics distinguishes based on what?

a)

Pointers

b)

Meaning of words and context

c)

Loops

d)

Classes

68.

Pragmatics interprets based on what?

a)

Tokens

b)

Situation, speakers intent, shared knowledge

c)

Memory

d)

Variables

69.

What converts text into lexemes?

a)

Syntactic Analysis

b)

Lexical Analysis

c)

Discourse Integration

d)

Fulfillment

70.

What shows relationships among words?

a)

Semantic Analysis

b)

Syntactic Analysis

c)

Pragmatic Analysis

d)

Node Creation

71.

What characterizes cooperative dialogues?

a)

Rules in Pragmatic Analysis

b)

Pointers

c)

Data types

d)

UI elements

72.

Chatbots simulate what?

a)

Memory allocation

b)

Human conversation

c)

Node traversal

d)

POS tagging

73.

Rule-based chatbots are also called what?

a)

AI-powered

b)

Command-based or keyword

c)

Semantic

d)

Pragmatic

74.

AI chatbots use what for better conversation?

a)

Fixed scripts

b)

Machine learning and NLP

c)

Continuous memory

d)

Weekday classes

75.

What varies in complexity for rule-based bots?

a)

Pointers

b)

If/then rules

c)

Lexemes

d)

Entities

76.

Chatbot architecture includes what for storage?

a)

Nodes

b)

Database

c)

Pointers

d)

Loops

77.

Applications of chatbots include what?

a)

OOP

b)

Healthcare and finance

c)

Memory pointers

d)

VerbNet

78.

Example of an Intent?

a)

New York

b)

Book a flight

c)

I want to fly

d)

Destination

79.

Example of an Entity?

a)

Book a flight

b)

New York as destination

c)

Open the door

d)

While loop

80.

Utterances are variations of what?

a)

Pointers

b)

User messages

c)

Classes

d)

Databases

81.

What stores extracted info like destination?

a)

Pointers

b)

Variables

c)

Lexemes

d)

Scripts

82.

Fulfillment executes what?

a)

Memory allocation

b)

Actions based on intent

c)

Node creation

d)

Text breaking

83.

Tokens in Lexical Analysis include what?

a)

Only words

b)

Words, punctuation, numbers

c)

Only sentences

d)

Only intents