Logo 
Search:

Artificial Intelligence Articles

Submit Article
Home » Articles » Artificial Intelligence » ProLogRSS Feeds

ProLog Program to buy and sale cars

Posted By: Milind Mishra     Category: Artificial Intelligence     Views: 3185

Program to buy and sale cars..........

Code for ProLog Program to buy and sale cars in Artificial Intelligence

predicates
   can_buy(symbol, symbol)
   person(symbol)
   car(symbol)
   likes(symbol, symbol)
   for_sale(symbol)

clauses
   can_buy(X, Y) :-
    person(X),
    car(Y),
    likes(X, Y),
       for_sale(Y).
   
   person(kelly).
   person(judy).

   car(mercedes).
   car(benz).

   likes(kelly, benz).
   likes(judy, pizza).

   for_sale(pizza).
   for_sale(mercedes).
   for_sale(benz).
  
Share: 


Didn't find what you were looking for? Find more on ProLog Program to buy and sale cars Or get search suggestion and latest updates.

Milind Mishra
Milind Mishra author of ProLog Program to buy and sale cars is from India.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!