Questions: 69

Answers by our Experts: 50

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Implement prolog program on recipe recommendation as per available ingredients.
i need help in prolog
Develop a logic expert sytem using PROLOG . The system should be
able to solve
i. 74+34
ii. 24*66
iii. 54-34
iv. 100/10
v. That , 44+5=50 is wrong
Represent the following information in a Prolog database.
Write facts to define the following information:
• John plays golf and tennis.
• Pete plays football and cricket.
• Anne plays tennis and netball.
• Mary plays golf and netball.
• Dave plays football, golf and cricket.
Write rules to define the following:
• Anne is friends with everyone.
• John is friends with anyone who plays both football and cricket.
• All the people who play golf are friends with each other.

Prolog Questions

1: write prolog program to search book by book_title ,by book_author, by book_edition Using

recursion.

Hint: your input must be from above mentions, your rule must recursively find the book and

display the complete book information as provided in facts.

Facts: book(b_name,b_authmb_edition)

search_book() :-

write(\"Enter book author name : \"),

readln(BOOK_AUTH),

data(name(Z),company(BOOK_AUTH)),

nl, write(Z),

fail.


1 Translate the following sentences into a Prolog program (10)
Everyone who teaches programming module is smart.
Craig teaches the programming module.
Craig’s brother teaches the mathematics module.
The programing module is interesting.
Craig’s sister teaches all modules.
1. Write a predicate (first_middle_last/4) to find the first, middle, and last elements of a list. Some built-in predicates that may help you: nth0/3 (this is written as nth/3 in the above link, but it should actually be nth0/3), length/2, div/2 (performs integer division). You may use any built-in predicates you like. There is a section on List Processing that you might find helpful. After implementing your predicate, please run the following tests and include the answers in your pdf submission (screenshots might work best).
a. first_middle_last ([1,2,3], First, Middle, Last).
b. first_middle_last ([1,2,3,4,5], First, Middle, Last).
c. first_middle_last ([19,25,72,9,4,15,23,19,32,41,53], First, Middle, Last).
A University of Zululand student graduates with a Bachelor of Science degree in Agriculture (Agronomy) by passing 20 modules in total. The marks obtained for each module (in percentage form) are given below:

71 52 81 66 77 96 83 77 65 59
82 97 72 91 50 63 53 74 77 88


1.1 Group the data into a frequency distribution with the lowest class lower limit of 50 percent and a class width of 10 percent.
Prolog Questions
1: write prolog program to search book by book_title ,by book_author, by book_edition Using
recursion.
Hint: your input must be from above mentions, your rule must recursively find the book and
display the complete book information as provided in facts.
Facts: book(b_name,b_authmb_edition)
search_book() :-
write(\"Enter book author name : \"),
readln(BOOK_AUTH),
data(name(Z),company(BOOK_AUTH)),
nl, write(Z),
fail.
Prolog Questions
1: write prolog program to search book by book_title ,by book_author, by book_edition Using
recursion.
Hint: your input must be from above mentions, your rule must recursively find the book and
display the complete book information as provided in facts.
Facts: book(b_name,b_authmb_edition)
search_book() :-
write(\"Enter book author name : \"),
readln(BOOK_AUTH),
data(name(Z),company(BOOK_AUTH)),
nl, write(Z),
fail.
LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS