Professional Documents
Culture Documents
AI Practical
AI Practical
IT DEPARTMENT
PRACTICAL LIST
SEM VIII : ARTIFICIAL INTELLIGENCE (2180703)
2 Write a PROLOG program to check whether a person X can eat Food Y or not. A
person X can eat food Y if X likes Y, Y is available and Y is eatable.
3 Given three relations child(X, Y) : X is a child of Y, male(X) : X is male and
female(X) : X is female. Write a PROLOG program to find relations like brother(X,
Y), father(X, Y), mother(X, Y), grandfather(X, Y), ancestor(X, Y), sister(X, Y),
grandmother(X, Y) between different members of a family.
4 Write a PROLOG program prepare a calculator that performs different operations like
add, mul, sub, div etc.
5 Write a PROLOG program to add numbers from 1 up to n.