Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ITCS 4 4 0 Assignment - I a ) Write a prolog program to show the summation of even numbers, odd numbers and the total

ITCS440
Assignment-I
a) Write a prolog program to show the summation of even numbers, odd numbers and the total numbers in a given list.
Example
?-??([2,5,7,3,9,6],M).
M=[8,24,32]
b) Given the following English text, convert it to prolog facts and rules
FACTS
// charlie studies csc135
// olivia studies csc135
// jack studies csc131
// arthur studies csc134
// kirke teaches csc135
// collins teaches csc131
// collins teaches csc171
// juniper teaches csc134
RULE
//x is a professor of Y if x
teaches C and Y studies C.
Run the program to answer the following Queries
// charlie studies what? OR
What does charlie study?
// Who are the students of professor kirke.
image text in transcribed

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

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago