Question: 1 . 1 Create the Knowledge Base in membership.pl file. Use Membership operation to check whether X is present in list L or not? Define

1.1 Create the Knowledge Base in membership.pl file. Use Membership operation to check whether X is
present in list L or not?
Define one predicate to do so.
Name is list_member(X,L).
Compile the file and ask the following questions:
Is b a member of list: [ b,[a, b, c]]?
Is b a member of list: [ b,[a,[b, c]]?
Is b a member of list: [[b, c],[a,[b, c]]?
Is b a member of list: [ d,[a, b, c]]?
Run the program, screen shot the output and pasted it to a Word document.
For the Knowledge Base, you can either submit membership.pl file or you copy and paste
it to the same Word document.
1.2 Create the Knowledge Base in delete.pl file. Use delete operation to delete X from list L.
Compile the file and ask the following questions:
Delete a from list: [a,e,i,o,u]
Delete a from list: [a]
Delete X from list: [a,e,i,o,u] and new list: [a,e,o,u], find X
Delete a from list: [e,i,o,u]
Run the program, screen shot the output and pasted it to a Word document.
For the Knowledge Base, you can either submit delete.pl file or you copy and paste it to
the same Word document.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!