Question
This is swi-prolog description('tom','blue_shirt') . description('tom','red_pants') . description('tom','black_hair') . description('bill','blue_shirt') . description('bill','white_pants') . description('bill','orange_hair') . description('bob','green_shirt') . description('bob','red_pants') . description('bob','purple_hair') . description('jessica','plain_shirt') . description('jessica','plain_pants') .
This is swi-prolog
description('tom','blue_shirt') .
description('tom','red_pants') .
description('tom','black_hair') .
description('bill','blue_shirt') .
description('bill','white_pants') .
description('bill','orange_hair') .
description('bob','green_shirt') .
description('bob','red_pants') .
description('bob','purple_hair') .
description('jessica','plain_shirt') .
description('jessica','plain_pants') .
description('jessica','black_hair') .
description('tim','plain_shirt') .
description('tim','orang_pants') .
description('tim','blue_hair') .
location('tom','new_york').
location('bill','new_york').
location('bob,'virginia').
location('jessica','mississippi').
location('tim','north_carolina')
printList([]).
printList([H|T]):-
write(H),nl,printList(T).
getList([X|List]):- read(X), dif(X,"Done"), getList(List).
getList([]).
main :-
write("Enter descripton:"),
nl,
getList(List1),
write("Enter Location: "),
nl,
getList(List2),
be able to code the list of possibilities
I want to be able to get the List of Possibilites:
*****Note this is just example of how the flow of the program should work****
Enter Description:
blue_shirt.
orange_hair.
plain_pants.
"Done."
Enter location :
new_york.
virginia.
mississippi.
"Done."
List Possibilites:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started