Question: Q2) Answer the following using PROLOG: Consider the following DB: book (1. titlel, george, 2010). book (2, title2. george, 2012). book (3. title3, david, 2011).
Q2) Answer the following using PROLOG: Consider the following DB: book (1. titlel, george, 2010). book (2, title2. george, 2012). book (3. title3, david, 2011). book (4. title4, wan, 2012). book (5, title5, sam, 2014). likes (george.susie). likes (george.david). likes (kate,susie). A) Write queries to answer the following questions? 1. In what year title2 was written? 2. What title did Sam write in year 2000? B) Add the following to the previous DB: 1-book (6, title, david, 2015) before the rule likes (george, susie). 2. likes (david, kate), before the rule c, where c:likes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
