Question: Dear Chegg Expert, Please Do AS SOON AS POSSIBLE . PLEASE DO IN PROLOG CORRECTLY, YOU WILL BE GIVEN THUMBS UP FOR CORRECTLY ANSWERED QUESTION

Dear Chegg Expert, Please Do AS SOON AS POSSIBLE. PLEASE DO IN PROLOG CORRECTLY, YOU WILL BE GIVEN THUMBS UP FOR CORRECTLY ANSWERED QUESTION AS ASKED. IF ANSWERED WRONG OR INCORRECT DONE, NO THUMBS UP WILL BE GIVEN. THIS QUESTION SHOULD ALSO NOT BE DONE IN PROLOG. READ THE QUESTION CAREFULLY.

Dear Chegg Expert, Please Do AS SOON AS POSSIBLE. PLEASE DO IN

A database of Prolog facts for a group of people contains the following two types of facts: name([, , ...)). female([, , ...)). age(, ) E.g., male([alex, tom, vic, ...]). E.g., female([ann, sara, ella, ...]). E.g. age(ann, 66). For these facts write the following rules (you may use Prolog library functions): person(, ). countF(). gender(, gender>). youngest(, ,). meanAge(). Find the name and the age of a person Find the number of female in the database Find the name and the gender (male or female) Find the name/age/gender of the youngest person Find the mean age of all people in the database

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 Databases Questions!