Chapter 1 & 2 - Practice

Q1: Properties

  • اعمل Facts للجمل الانجليزي دي:
  1. Gold is valuable.
  2. Saly is a female.
  3. Aly owns some gold.
  4. Gamal gives the book to Mona. (3 arguments)

Q2: Facts Translation

  • اعمل Facts لجمل الانجليزي دي:
  1. A car is fun.
  2. A rose is red.
  3. Bill likes Cindy.
  4. Cindy likes Bill.
  5. Bill likes dogs.

Q3: Age Database

  • اعمل قاعدة بيانات للداتا دي:
  1. Aly is 42 years old.
  2. Hany is 15 years old.
  3. Saly is 20 years old.
  4. Aly is male.
  5. Hany is male.
  6. Saly is female.
  • واكتب الاستعلامات دي:
  1. Is Aly 42 years old?
  2. What is Hany's age?
  3. Who is male? (اعرض كل الإجابات)
  4. List names with age < 40.
  5. List names with age < 40 and they are female.

Q4: Love Database 💕💕

  • اعمل قاعدة بيانات بالـ Facts دي:
  1. Mia is a woman.
  2. Jana is a woman.
  3. Yara is a woman.
  4. Fady loves Mia.
  5. Magdy loves Mia.
  6. Magdy loves Badr.
  7. Aly loves Badr.
  8. Hany loves Aly.
  • واكتب الاستعلامات:
  1. Who is a woman? (اعرض كل النتائج واحدة واحدة)
  2. Does Magdy love Mia?
  3. Does Magdy love Badr?

Q5: Conjunctions

  • من قاعدة البيانات:
likes(mary, food).
likes(mary, tea).
likes(john, tea).
likes(john, mary).
  • اكتب الاستعلامات دي باستخدام الـ conjunctions ا ( and , or ):
  1. Does John like Mary and does Mary like John?
  2. Is there anything that John and Mary both like?

Q6: Jim's Family

  • اعمل قاعدة بيانات لعيلة Jim:
  1. John is the father of Jim.
  2. Jack is father of John.
  3. Jane is the mother of Jim.
  • واكتب الاستعلامات:
  1. Who is Jim's father?
  2. Is Jane the mother of Fred?
  3. Is Jane the mother of Jim?
  4. Does Jack have a grandchild?

Q7: Charles's Family

  • اعمل قاعدة بيانات لعيلة Charles:
  1. Charles is male.
  2. Edward is male.
  3. Philip is male.
  4. Anne is female
  5. Philip is a parent of Anne
  6. Philip is a parent of Edward
  7. Philip is a parent of Charles
  • واكتب الاستعلامات دي:
  1. The parents of Charles.
  2. The father of Charles.
  3. The grandfather of Charles.
  4. All the grandchildren of the grandparents of Charles. ( احفاد جد تشارلز )
  5. All males.

Q8: Pam & Bob Family Tree

  • استخدم قاعدة بيانات لشجرة عيلة Pam و Bob :
parent(pam, bob).
parent(tom, bob).
parent(tom, liz).
parent(bob, ann).
parent(bob, pat).
parent(pat, jim).
  • واكتب الاستعلامات:
  1. Who is Liz's parent?
  2. Who are Bob's children?
  3. Who is a parent of whom?
  4. Who is a grandparent of Jim?.
  5. Do Ann and Pat have a common parent?

Nour Eldeen Mahmoud