/* Comments in prolog \\+ represents \"not equal to\" */%single line comments da
ID: 3828246 • Letter: #
Question
/* Comments in prolog + represents "not equal to" */%single line comments day("sunday"). day("monday"). day("tuesay"). day("Wednesday"). day("thursday"). day("friday"). no_office("sunday"). no_office("saturday"). take_leave("monday"). visit_mom(X): - no_office(X) | take_leave(X). Interpret the queries and guess(!) the answer(s) produced by the program: day("Holiday"). day(X). visit_mom(X). visit_mom(X). provided you have changed the rule with this: visit_mom(X):- no_office(X), take_leave(X). define a new rule "working_day(X)"to detect the days _that are not holidays.Explanation / Answer
1. day("Holiday") - Sunday
2. day(X) - Sunday, Monday, Tuesday, Wednesday, Thursday, Friday
3. visit_mom(X) - Sunday, Saturday, Monday
4. visit_mom(X) - Sunday, Monday, Saturday
5. working_day(X) - day(X) - visit_mom(X)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.