Question: CS 4 1 0 HW 7 : Question 1 Operations on Lists 1 . 1 Create the Knowledge Base in membership.pl file. Use Membership operation

CS 410 HW 7:
Question 1 Operations on Lists
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: ?
Is b a member of list: ?
Is b a member of list: ?
Is b a member of list: ?
Run the program, screen shot the output and pasted it to a 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: a0,i,i,u,u
Delete a from list: [a]
Delete x from list: a,e,i,0,4 and new list: a,e,0,4, find x
Delete a from list: e,i,0,u
Run the program, screen shot the output and pasted it to a Word document.
CS 4 1 0 HW 7 : Question 1 Operations on Lists 1

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!