
Understanding Prolog: Facts, Rules, Queries
Authored by Matthew Wemyss
Computers
12th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a fact in Prolog?
A statement that defines a condition that must be true.
A statement that is always true and represents basic assertions about the world.
A statement that defines a relationship between two or more facts.
A statement that asks a question about the facts and rules.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a Prolog fact?
`likes(john, pizza).`
`likes(X, Y) :- loves(X, Y).`
`?- likes(john, pizza).`
`if likes(john, pizza) then true.`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a rule in Prolog?
A statement that is always true and represents basic assertions about the world.
A statement that defines a relationship between facts and can be used to infer new information.
A statement that asks a question about the facts and rules.
A statement that defines a condition that must be true.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a Prolog rule?
`likes(john, pizza).`
`likes(X, Y) :- loves(X, Y).`
`?- likes(john, pizza).`
`if likes(john, pizza) then true.`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a query in Prolog?
A statement that is always true and represents basic assertions about the world.
A statement that defines a relationship between facts and can be used to infer new information.
A statement that asks a question about the facts and rules.
A statement that defines a condition that must be true.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a Prolog query?
`likes(john, pizza).`
`likes(X, Y) :- loves(X, Y).`
`?- likes(john, pizza).`
`if likes(john, pizza) then true.`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Prolog, how would you express that "John likes anyone who loves pizza"?
`likes(john, X) :- loves(X, pizza).`
`loves(john, X) :- likes(X, pizza).`
`likes(X, john) :- loves(pizza, X).`
`loves(X, pizza) :- likes(john, X).`
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Toán tử trong C ++
Quiz
•
10th - 12th Grade
14 questions
Kiểu dữ liệu xâu kí tự - xử lí xâu kí tự
Quiz
•
9th - 12th Grade
20 questions
Ôn tập học kỳ I
Quiz
•
9th - 12th Grade
13 questions
Data Visualization Quiz
Quiz
•
9th - 12th Grade
20 questions
I sottoprogrammi in C
Quiz
•
10th - 12th Grade
13 questions
Python Fundamentals and Programming
Quiz
•
11th - 12th Grade
15 questions
History of Computers
Quiz
•
6th - 12th Grade
15 questions
Grade 12-Python selection&iteration
Quiz
•
11th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade