Domains
subject,name,department=string
Predicates
easyCourse(subject)
hardCourse(subject)
likes(name,subject)
course(subject,department)
startup
Clauses
course("BK301","BasketWeaving").
course("BK302","BasketWeaving").
course("BK303","Science").
course("BK304","Science").
course("BK305","BasketWeaving").
easyCourse(Subject) :-
course(Subject,"BasketWeaving").
hardCourse(Subject) :-
course(Subject,"Science").
likes(_,Subject) :-
easyCourse(Subject).
startup :-
write("\nWhich Course Would Steve Like ?\n"),
likes("Steve",Subject),
write("\n",Subject),
fail.
Goal
clearwindow,
makewindow(1,2,3,"Steve Like Courses",0,0,25,80),
startup.
Output :->
+------------------------------Steve Like Courses------------------------------+
¦ ¦
¦Which Course Would Steve Like ? ¦
¦ ¦
¦BK301 ¦
¦BK302 ¦
¦BK305 ¦
¦Press the SPACE bar ¦
¦ ¦
+------------------------------------------------------------------------------+