Skip to main content

Artificial Intelligence MCQs with Answers

Practice important Artificial Intelligence MCQs with answers and explanations.

Chapter: 23
Q761:
Which command is used to load a file containing saved constructs in CLIPS?
A. (load "filename.clp")
B. (save "filename.clp")
C. (printout)
D. (set-break)
Correct Answer: A
Chapter: 23
Q762:
To save all currently loaded constructs in CLIPS to a file, which command is used?
A. (save "filename.clp")
B. (load "filename.clp")
C. (remove-break)
D. (show-breaks)
Correct Answer: A
Chapter: 23
Q763:
In CLIPS, variables used on the left-hand side of a rule are preceded by which symbol?
A. ?
B. $
C. #
D. @
Correct Answer: A
Chapter: 23
Q764:
What does the variable $?name represent in CLIPS pattern matching?
A. A multi-field wildcard variable
B. Single field variable
C. A constant
D. Function call
Correct Answer: A
Chapter: 24
Q765:
In CLIPS, anything after a semicolon (;) is considered a _______.
A. Code
B. Command
C. Comment
D. Function
Correct Answer: C
Chapter: 24
Q766:
What command is used to define initial facts in CLIPS?
A. (deffacts)
B. (defrule)
C. (assert)
D. (printout)
Correct Answer: A
Chapter: 24
Q767:
Which of the following is a fact defined in (deffacts startup)?
A. (animal dog)
B. (mammal dog)
C. (child-of dog puppy)
D. (lays-eggs cat)
Correct Answer: A
Chapter: 24
Q768:
What does the rule (defrule animal (animal ?x) => (printout t "animal found: " ?x crlf)) do?
A. Prints the name of animals
B. Adds a new animal
C. Removes animals
D. Checks if an animal is warm-blooded
Correct Answer: A
Chapter: 24
Q769:
In the rule mammal, what condition excludes an animal from being a mammal?
A. (animal ?name)
B. (warm-blooded ?name)
C. (not (lays-eggs ?name))
D. (lays-eggs ?name)
Correct Answer: D
Chapter: 24
Q770:
What happens when the mammal rule conditions are met?
A. (printout t ?name " is a mammal")
B. (assert (mammal ?name))
C. (Both A and B)
D. Nothing
Correct Answer: C
Chapter: 24
Q771:
The rule mammal2 asserts that the child of a mammal is also a _______.
A. Mammal
B. Reptile
C. Bird
D. Fish
Correct Answer: A
Chapter: 24
Q772:
What is the purpose of the commented-out rule remove-mammals?
A. To add mammals
B. To retract mammals
C. To print mammals
D. To assert animals
Correct Answer: B
Chapter: 24
Q773:
Which command reads user input in CLIPS?
A. (read)
B. (printout)
C. (assert)
D. (defrule)
Correct Answer: A
Chapter: 24
Q774:
In the rule what-is-child, what does (not (child-of ?name ?)) check?
A. If the animal has no child
B. If the animal has a child
C. If the animal is warm-blooded
D. If the animal lays eggs
Correct Answer: A
Chapter: 24
Q775:
What is the operator used in CLIPS prefix notation for logical OR?
A. (or)
B. (and)
C. (not)
D. if
Correct Answer: A
Chapter: 24
Q776:
In the example (defrule take-umbrella (or (weather raining) (weather snowing)) => (assert (umbrella required))), what happens if it is snowing?
A. The umbrella is required
B. The umbrella is not required
C. Nothing happens
D. Weather changes
Correct Answer: A
Chapter: 24
Q777:
Which command adds a fact in CLIPS?
A. (assert)
B. (retract)
C. (printout)
D. (defrule)
Correct Answer: A
Chapter: 24
Q778:
In CLIPS, the command (printout t "animal found: " ?x crlf) is used to _______.
A. Print messages
B. Assert facts
C. Retract facts
D. Define rules
Correct Answer: A
Chapter: 24
Q779:
(child-of cat kitten) means kitten is a child of _______.
A. Cat
B. Dog
C. Turtle
D. Duck
Correct Answer: A
Chapter: 24
Q780:
In CLIPS, variables are prefixed with _______.
A. ?
B. $
C. #
D. !
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Artificial Intelligence

🚀 Start Quiz Now