Reputation: 9
I have this database in Prolog. I'm trying to write a query that will return the names of all the people who own a honda
.
I know how to do this with just car or truck with owns(X,car(honda,,)). , but I'm unsure how to return all the owners from car, truck and motorcycle at the same time.
Any help will be greatly appreciated I've been stuck on this problem for a while.
owns(bill, car(ford, mustang, 1964)).
owns(sue, car(pontiac, gto, 1967)).
owns(george, car(honda, civic, 2013)).
owns(betty, truck(ford, f150, 2013)).
owns(henry, motorcycle(honda, goldwing, 2010)).
Upvotes: 1
Views: 75