Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Prolog Suppose we have a collection of rules about what people are wearing. We will represent an item of clothing by a structure with function

Prolog

Suppose we have a collection of rules about what people are wearing. We will represent an item of clothing by a structure with function name "clothing" and three parameters: the type of clothing (hat, shirt, etc.), the color (blue, green, etc.), and the size (a whole number). For example:

wearing( julia, clothing( hat, red, 3 ) ). wearing( julia, clothing( shirt, blue, 4 ) ). wearing( jack, clothing( shirt, purple, 6 ) ). wearing( bill, clothing( hat, red, 10 ) ). wearing( marie, clothing( shirt, blue, 2 ) ). wearing( jack, clothing( hat, green, 10 ) ).

Write a rule (and then test it) to find facts of who will be pinched on Saint Patricks Day for not wearing green.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions