# data[].attributes.headline
Eugene leong Jun Tong,Lim Chin Huat, Ng Chong So

# data[].attributes.subject
Eugene leong Jun Tong,Lim Chin Huat, Ng Chong So

# data[].attributes.body
Looking for life partner......
Fact
strong(lim).
handsome(lim).

Rule
love(marry,X):-stong(X),handsome(X).
attractive(X):-handsome(X).
muscle(X):-strong(X

# data[].attributes.body
Poverty
Fact
Poor(no job).
Poor (no income).
Rich(got job with income) .

# data[].attributes.body
Not enough money to spend in usm
Facts
student(a,save_money)
student(b,wise_spending)
enough_money(X):-student(X,save_money)
enough_money(X):-student(X,wise_spending)

# data[].attributes.body
Fact
no money(Rakyat, worker)
rich(Najib, boss)
no money(PH, new government )
broke(rakyak, PH)

Rule
Broke(X) :No money(X , worker),No money(X, new government)
Not broke(X): Rich(X,boss)

# data[].attributes.body
Facts
absent(amy, sick).
absent(jake, busy).
absent(john, tired).
present(catherine, hardworking).

Rules
attendance_absent(X):- absent(X,_).
attendance_present(Y):-present(Y,_).

# data[].attributes.body
Fact
Eat(xueyao,fajar).
Eat(weinam,fajar).
Eat(weijian,fajar).
Eat(weijian,subaidah).

Rules
Together(X,Y,Z):-Eat(X,fajar),Eat(Y,fajar),Eat(Z,fajar).

# data[].attributes.body
bus_stops(a, b)
bus_stops(b, c)
bus_stops(c, d)

is_continuous(X, Y) :- bus_stops(X, Z), bus_stops(Z, Y)

# data[].attributes.body
Fact :
Eat (Jane, MCD)
Eat (Adam, MCD)
Eat (Jane, KFC)
Eat (Justin Bieber, CENDOL)

Rule:
hungry(X,Y) :- eat(X,MCD) , eat(Y,MCD)

# data[].attributes.body
Akkhara, LeeSing
FACTS
join(alex,cs_society).
join(alex,taekwondo_club).
RULE
not_enough_time(X):- join(X,Y),join(X,Z).

# data[].attributes.body
Tough
Strong

# data[].attributes.body
Problem

# data[].attributes.headline
Ngu Tze Hieng , Lim Shau Hong , AwKhengFu

# data[].attributes.subject
Ngu Tze Hieng , Lim Shau Hong , AwKhengFu

# data[].attributes.headline
Nurul Adilah asri & Farah Mursyidah (group A)

# data[].attributes.subject
Nurul Adilah asri & Farah Mursyidah (group A)

# data[].attributes.body
Fact
takes(usm_student,bus A,B,C,D).
Rule
usm_student(X):- takes(X,busA,B,C,D).
Query
?-usm_student(X)
Answer=yes

# data[].attributes.body
Problem: Being single.
Facts:
poor(yi_xian)
busy(siang_sheng)
ugly(siang_sheng)
not_attractive(yi_xian)
rich(kong_quan)
free(kong_quan)
handsome(kong_quan)
pretty(kong_quan)
attractive(kong_quan)

Rules:
single(X):- poor(X), busy(X), ugly(X), not_attractive(X)
coupled(X):- rich(X), free(X), handsome(X), pretty(X), attractive(X)

# data[].attributes.body
Izzati and syahirah (E

# data[].attributes.body
Problem : no time to do assignment
Facts: busy(Cheong, test).
busy(Kang,event).
Rules: fail_assignment(X):-busy(X,test).
fail_assignment(X):-busy(,event).

# data[].attributes.body
smartphone(huawei)
smartphone(snowy)

smartphone(Q) :- can (Q,call someone) can (Q,send message).

# data[].attributes.body
Akkhara, LeeSing
FACTS
join(alex,cs_society).
join(alex,taekwondo).
RULE
not_enough_time(X):- join(X,Y), join(X,Z).

# data[].attributes.body
Rules of

# data[].attributes.headline
WONG SENG Yong, Tang Wen Shuen, Loke Cherng Yi

# data[].attributes.subject
WONG SENG Yong, Tang Wen Shuen, Loke Cherng Yi

# data[].attributes.body
Fact: smart(Y)
Query: ?-smart(Y)
Answer:yes
Rule: help(Y,X):-didnotpass(X,exam)

# data[].attributes.body
Problem: sleep
Fact
Has_to(x,study)
No_need_to(x,study)
Cannot(x,sleep)
Can(x,sleep)

Rules
Test(X):- cannot(x,sleep),has_to(x,study)
No_test(X):-can(x,sleep),no_need_to(x,study)

# data[].attributes.body
List of course
Fact:
study(john, computerscience)
study(susie, math)
Rules:
bar(X) :- study(X, fail_exam)

# data[].attributes.headline
Lai Ying Ying, Lim Phei Sze, Pee Ling Hong

# data[].attributes.subject
Lai Ying Ying, Lim Phei Sze, Pee Ling Hong

# data[].attributes.body
fact
problem(no_money)
Problem(sleepy)

Rule
Part_time_job(X):-no_money(X)
Enough_sleep(X):-sleepy (X)

# data[].attributes.headline
Suen Kee Xian , Kuan Chi Hng,  Begzod Safarov

# data[].attributes.subject
Suen Kee Xian , Kuan Chi Hng,  Begzod Safarov

# data[].attributes.body
Problem : Do not understand
cantconcentrate(chris, tired)
cantconcentrate(ong, notinterested)
bored (sum, notinterested)
bored (sum, don'tknowwhatitis)

fail (x) : - cantconcentrate(x,y) ; bored (x,y)

# data[].attributes.body
Facts
Likes(x,y).
Likes(y,x).

Rules
Friends (x,y) :- likes (x,y), likes (y,x) .
Hates (x,y) :- not (likes(x,y)).

# data[].attributes.body
Fact

# data[].attributes.body
Facts:

# data[].attributes.body
fact:
give_box(si,dd)
give_box(pdd,www)
rule:
have(A,box):-give_box(B,D),give_box(D,A)

# data[].attributes.body
Hanim Sofiah
Farhana Zulaikha
Group F

# data[].attributes.body
#Facts
Eat(Fakhru,fast)
Drink(Fakhru, don't)
Eat(Den,fast)
#Rule
Choke(X,Y):-Eat(X,Z),Eat(Y,Z)
C

# data[].attributes.headline
Ooi Si Sheng & Wong Yoke Chi & Yeo Pui Yan

# data[].attributes.subject
Ooi Si Sheng & Wong Yoke Chi & Yeo Pui Yan

# data[].attributes.body
lives(jane, restu)
lives(ahmad, restu)
lives(abu, restu)

desamate(X,Y,Z) :- lives(X, Q), lives(Y,Q), lives(Z, Q)

# data[].attributes.headline
Yaap Eng Tatt, Tan May Min, Ng Jing Xuan

# data[].attributes.subject
Yaap Eng Tatt, Tan May Min, Ng Jing Xuan

# data[].attributes.body
Problem: Hungry
Facts:
hungry(tatt,haven_eat_lunch)
hungry(jx,no_eat_breakfast)
Rules:
want_to_eat (X,Y) :- hungry(X,haven_eat_lunch), hungry(Y,no_eat_breakfast)
?-want_to_eat(X,Y).
Answer: X=tatt, Y=jx.

# data[].attributes.body
Facts
Likes (x,y).
Likes (y,x).

Rules
Friends (x,y) :- likes (x,y), likes (y,x).
Hates (x,y) :- not (likes(x,y)).

# data[].attributes.body
Fact
Got (Sarah, sick)
Got (Aliya, sick)
Got (Aliya, mc)

Rules

# data[].attributes.body
grad (student,attend_class)
grad (student, pass_exam)

success(x):- grad (x,attend_class),(x,pass_exam)
fail(x):- grad(x,attend_class)

?- success (pass_exam

# data[].attributes.body
herlin,athirah,dalila

# data[].attributes.body
Facts:
quarterfinal(team_a,win).
semifinal(team_a,win).
semifinal(team_b,lose).

Rules:
enter_final:-quarterfinal(X,win),semifinal(X,win).

?-enter_final(X).
Answer=team_

# data[].attributes.body
grad(attend_class)
grad(pass_exam)

success(X):-grad(X,attend_class),  (X,pass_exam)

fail(X):-grad(X,attend_class)

?-success(attend_class).

# data[].attributes.body
Rules
semifinal(lakers,win).
quarterfinal(lakers,win).
quarterfinal(redbull,lose).

Facts
enter_final(X):-quarterfinal(X,win),semifinal(X,win).

?-enter_final(X).
Answer=lakers

# data[].attributes.body
Chew Mi Chi ko
Wan Cai Xuan

Ong Yee Wei

# data[].attributes.headline
Nurul Adilah & Farah Mursyidah (Group A)

# data[].attributes.subject
Nurul Adilah & Farah Mursyidah (Group A)

# data[].attributes.body
Problem: To identify favorite food of students

Fact:
wedges(fatin)
burger(azwaar)
pizza(darshini)

Rules:
favorite_food(X) :- burger(X)
favorite_food(Y) :- pizza(Y)

Query:
?- favorite_food(azwaar)

Answer:
true

# data[].attributes.body
restless_because_of (X, playing games)
restless_because_of (X, assignment)
restless_because_of (Y, watching videos)
restless_because_of (Y, playing games)

familiar_with (X, Y) :- restless(X, playing games), restless(Y, playing games)

# data[].attributes.body
Fact
got(Sarah, sick)
got(Aliya, sick)
got(Aliya, MC)

Rules
absent(X,class):- got(X, sick) , got(X, MC)
absent(X, class):- got(X, MC) , got(Y, MC)

# data[].attributes.body
Facts and Rules:

1. takes_bus_a(halim,bus_a).

2. takes_bus_d(halim,bus_d).

3. no_bus(convocation).

4. takes_no_bus(halim,no_bus).

5. walks(halim):-takes_no_bus(halim,no_bus).

6. tired_walking(halim):-walks(halim).

7. complains(halim):-takes_no_bus(halim,no_bus).

Query:

1. ?-takes_no_bus(X,no_bus).

2. ?-complains(halim).

# data[].attributes.body
Izzati M_Pouzi
Filza Fadil