School of Science and Technology Assumption University
CS2203 / CSX3004 Programming Languages
Name: ID: Section:
Copyright By PowCoder代写 加微信 powcoder
Instruction:
· Name your file relations_ID.pl where ID is your student ID
· Upload it on MS Teams when done.
Given the following facts, define predicates/rules as requested.
male(kim).
male(kent).
male(herbert).
female(holly).
female(margaret).
female(esther).
female(jean).
parent(kim,holly).
parent(margaret,kim).
parent(margaret,kent).
parent(esther,margaret).
parent(herbert,margaret).
parent(herbert,jean).
1. Define a mother predicate so mother(X, Y) means that X is a mother of Y.
2. Define a father predicate so father(X, Y) means that X is a father of Y.
3. Define a sister predicate so sister(X, Y) means that X is a sister of Y. Note that a person cannot be her own sister.
CS2203/CSX3004 Programming Languages 1 of 3
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com