Question: 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.
 ITCS440 Assignment-I a) Write a prolog program to show the summation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!