SlideShare une entreprise Scribd logo
1  sur  30
Topic:
Languages Of AI (lisp/prolog)

Group Members:
Shagufta Arif (027)
Sania Alyas (020)
Maryam Afza (006)
What is LISP??
LISP stands for (LIST
PROCESSING). It was invented
by John McCarthy in 1958. As its
name implies, LISP is a
programming language that
manipulates LISTS.
LISP Discription:
A list is either empty or non-empty.
[a, b, c, d]
Empty: []
Non-empty: head=[a] tail=[b, c, d]
Example:
 We can implement a function to compute

factorials using recursion:
 (defun factorial (N)
"Compute the factorial of N."
(if (= N 1)
1
(* N (factorial (- N 1)))))
Example:
 Here are some simple example using the if

operator:
 CL-USER(): (if (> 3 4)"yes“ "no")
ANS:
"no“
Applications of LISP:
 Mathematics
 Artificial intelligence and natural language

processing.
 Expert Systems (diagnosis, identification,
design )
Advantages of LISP:
 Common Lisp is :
 a general-purpose programming language and an AI

language

 Common Lisp programs are:
 easy to test
 easy to maintain (depending on programming
style)

 intractive
Cont…
 Provides clear syntax
 LISP expressions are case-insensitive.
 runtime typing:
the programmer need not bother about type
declarations

 several data types:
numbers, strings, arrays, lists, char, symbols etc.
Disadvantages of LISP
 The major disadvantage is due to the

lack of popularity and lack of
widespread support and knowledge.
 It is relatively hard to find Lisp
programmers.
What is PROLOG?
 PROLOG is a declarative language

where programs are expressed in
terms of relations.
 A program in PROLOG can use logical
reasoning to answer questions that
can be inferred from the knowledge
base.
Cont …
A Prolog language designed in Europe to
support natural language processing.
It was created by Alain and Robert 1972 as an
alternative to the Lisp programming languages.
Conti…
 There are three basic stratgies in Prolog:
facts, rules, and queries.
 A collection of facts and rules which
describe some collection of relationships is
called a knowledge base.
 That is, Prolog programs simply are
knowledge bases.
Conti…
Prolog includes an inference engine, which is
a process for reasoning logically about
information. The inference engine includes a
pattern matcher, which retrieves stored
(known) information by matching answers to
questions.
One important feature of Prolog is find all
possible solutions rather than only one.
PROLOG Example
mortal(X) :- man(X)

% Xismortal
if X is a man.
% Socrates is a man

man(socrates).
and then ask Prolog
?- mortal(socrates). % Is Socrates
mortal?
and it will immediately tell me yes
Applications of PROLOG
 Expert systems
 Relational queries
 Parsing of context free language
 Natural language processing

 Natural support of

pattern-matching
Advantages of PROLOG
 The language works well for tasks like

proving mathematical theorems
 It has built-in list handling, very useful for
representing sequences, trees, and so on.
 It is easy to read and write programs which
build structures.
Similarities:
 One of the similarities that makes these

languages unique is their ability to rewrite
themselves as the program is running.
 In Lisp, the program itself can be treated as
data that the program can manipulate.
 The both languages are object oriented
programming languages.
Differences:
 The main difference between the two languages
is the way problems are described.
 In Lisp, the programmer must describe how the
computer will solve the problem (chess game).
 In Prolog, the developer does not need to
describe how, but rules points the program

toward the desired results. (medical symptoms).
 Prolog is not a general-purpose theorem prover.
LISP is a general purpose theorem
 PROLOG has many functional languages other
than LISP.
LISP & PROLOG

PROGRAMMING LANGUAGE
Arithmetic Operations
Point of comparison

LISP

PROLOG

ADD

(+2 3)

2+3

SUBTRACT

(-5 2)

(5-2)

MULTIPLICATION

(* 3 2)

(2*3)

DIVISION

(/ 6 2)

(6/2)

BRACES

(+3 (* 3 2 ) 4)

(3+ (3 *2)
Logical operations
Point of comparison

LISP

PROLOG

SMALLER

(< 3 4 )
True

3<4
yes

GREATER

(> 3 4 )
NIL

3>4
No

Smaller than or equal (< = 3 2)
Nil

Greater than or equal ( > = 3 2)

3=<2
No

true

3>=2
Yes

Equal

( = 3 4)
Nil

3 =:= 4
no

Not Equal

( = 3 4 )
True

( 3 == 4)
Yes
PROLOG Example
 age(john,32).
 age(agnes,41).

 age(george,72).
 age(hiba,2).
 age(thomas,25).

QUERIES
age(hiba,2).
agnes(41).
Thanks

Contenu connexe

Tendances

Compiler_Project_Srikanth_Vanama
Compiler_Project_Srikanth_VanamaCompiler_Project_Srikanth_Vanama
Compiler_Project_Srikanth_Vanama
Srikanth Vanama
 

Tendances (20)

Presentation on python data type
Presentation on python data typePresentation on python data type
Presentation on python data type
 
Python Data-Types
Python Data-TypesPython Data-Types
Python Data-Types
 
Advance LISP (Artificial Intelligence)
Advance LISP (Artificial Intelligence) Advance LISP (Artificial Intelligence)
Advance LISP (Artificial Intelligence)
 
Intro to python
Intro to pythonIntro to python
Intro to python
 
Datastrucure
DatastrucureDatastrucure
Datastrucure
 
Object reusability in python
Object reusability in pythonObject reusability in python
Object reusability in python
 
Chapter 10 data handling
Chapter 10 data handlingChapter 10 data handling
Chapter 10 data handling
 
Ground Gurus - Python Code Camp - Day 3 - Classes
Ground Gurus - Python Code Camp - Day 3 - ClassesGround Gurus - Python Code Camp - Day 3 - Classes
Ground Gurus - Python Code Camp - Day 3 - Classes
 
Regular Expressions
Regular ExpressionsRegular Expressions
Regular Expressions
 
Bhushan Rathi
Bhushan RathiBhushan Rathi
Bhushan Rathi
 
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuPrologLabelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
 
Compiler_Project_Srikanth_Vanama
Compiler_Project_Srikanth_VanamaCompiler_Project_Srikanth_Vanama
Compiler_Project_Srikanth_Vanama
 
Clean code
Clean codeClean code
Clean code
 
Data types in python lecture (2)
Data types in python lecture (2)Data types in python lecture (2)
Data types in python lecture (2)
 
Aaa ped-3. Pythond: advanced concepts
Aaa ped-3. Pythond: advanced conceptsAaa ped-3. Pythond: advanced concepts
Aaa ped-3. Pythond: advanced concepts
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
 
OODP Unit 1 OOPs classes and objects
OODP Unit 1 OOPs classes and objectsOODP Unit 1 OOPs classes and objects
OODP Unit 1 OOPs classes and objects
 
Python libraries
Python librariesPython libraries
Python libraries
 
record_linking
record_linkingrecord_linking
record_linking
 
Doppl development iteration #4
Doppl development   iteration #4Doppl development   iteration #4
Doppl development iteration #4
 

En vedette

Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert HenrichsPioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Wolfgang Stock
 
Vb.net session 15
Vb.net session 15Vb.net session 15
Vb.net session 15
Niit Care
 
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-uPython Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
Nikola Plejic
 
Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3
a_akhavan
 
Part 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.netPart 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.net
Girija Muscut
 

En vedette (20)

Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert HenrichsPioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++
 
Making Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information DesignMaking Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information Design
 
Vb.net session 15
Vb.net session 15Vb.net session 15
Vb.net session 15
 
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-uPython Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
 
Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3
 
Part 1 picturebox using vb.net
Part 1 picturebox using vb.netPart 1 picturebox using vb.net
Part 1 picturebox using vb.net
 
Transforming the world with Information technology
Transforming the world with Information technologyTransforming the world with Information technology
Transforming the world with Information technology
 
Logical Programming With ruby-prolog
Logical Programming With ruby-prologLogical Programming With ruby-prolog
Logical Programming With ruby-prolog
 
Debugging in visual studio (basic level)
Debugging in visual studio (basic level)Debugging in visual studio (basic level)
Debugging in visual studio (basic level)
 
How Not To Be Seen
How Not To Be SeenHow Not To Be Seen
How Not To Be Seen
 
Cognitive information science
Cognitive information scienceCognitive information science
Cognitive information science
 
Part 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative valuePart 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative value
 
Part2 database connection service based using vb.net
Part2 database connection service based using vb.netPart2 database connection service based using vb.net
Part2 database connection service based using vb.net
 
Part 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.netPart 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.net
 
Information Overload and Information Science / Mieczysław Muraszkiewicz
Information Overload and Information Science / Mieczysław MuraszkiewiczInformation Overload and Information Science / Mieczysław Muraszkiewicz
Information Overload and Information Science / Mieczysław Muraszkiewicz
 
Part 3 binding navigator vb.net
Part 3 binding navigator vb.netPart 3 binding navigator vb.net
Part 3 binding navigator vb.net
 
Science Information Literacy Tutorials and Pedagogy
Science Information Literacy Tutorials and Pedagogy Science Information Literacy Tutorials and Pedagogy
Science Information Literacy Tutorials and Pedagogy
 
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
 

Similaire à Presentation1

Programming Languages - Functional Programming Paper
Programming Languages - Functional Programming PaperProgramming Languages - Functional Programming Paper
Programming Languages - Functional Programming Paper
Shreya Chakrabarti
 
Prolog (present)
Prolog (present) Prolog (present)
Prolog (present)
Melody Joey
 

Similaire à Presentation1 (20)

Programming Languages - Functional Programming Paper
Programming Languages - Functional Programming PaperProgramming Languages - Functional Programming Paper
Programming Languages - Functional Programming Paper
 
PARADIGM IT.pptx
PARADIGM IT.pptxPARADIGM IT.pptx
PARADIGM IT.pptx
 
LISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола МозговийLISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола Мозговий
 
CPPDS Slide.pdf
CPPDS Slide.pdfCPPDS Slide.pdf
CPPDS Slide.pdf
 
Lecture 2 lisp-Overview
Lecture 2 lisp-OverviewLecture 2 lisp-Overview
Lecture 2 lisp-Overview
 
Prolog (present)
Prolog (present) Prolog (present)
Prolog (present)
 
Declarative programming language
Declarative programming languageDeclarative programming language
Declarative programming language
 
LISP: Introduction to lisp
LISP: Introduction to lispLISP: Introduction to lisp
LISP: Introduction to lisp
 
LISP: Introduction To Lisp
LISP: Introduction To LispLISP: Introduction To Lisp
LISP: Introduction To Lisp
 
Learning and Modern Programming Languages
Learning and Modern Programming LanguagesLearning and Modern Programming Languages
Learning and Modern Programming Languages
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementation
 
Python programming
Python programmingPython programming
Python programming
 
3.5
3.53.5
3.5
 
OBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docxOBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docx
 
Prolog Programming Language
Prolog Programming  LanguageProlog Programming  Language
Prolog Programming Language
 
Let's LISP like it's 1959
Let's LISP like it's 1959Let's LISP like it's 1959
Let's LISP like it's 1959
 
On being a professional software developer
On being a professional software developerOn being a professional software developer
On being a professional software developer
 
Unit 1
Unit 1Unit 1
Unit 1
 
JAVA
JAVAJAVA
JAVA
 
Антон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLabАнтон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLab
 

Dernier

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Dernier (20)

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 

Presentation1

  • 1.
  • 2. Topic: Languages Of AI (lisp/prolog) Group Members: Shagufta Arif (027) Sania Alyas (020) Maryam Afza (006)
  • 3. What is LISP?? LISP stands for (LIST PROCESSING). It was invented by John McCarthy in 1958. As its name implies, LISP is a programming language that manipulates LISTS.
  • 4. LISP Discription: A list is either empty or non-empty. [a, b, c, d] Empty: [] Non-empty: head=[a] tail=[b, c, d]
  • 5. Example:  We can implement a function to compute factorials using recursion:  (defun factorial (N) "Compute the factorial of N." (if (= N 1) 1 (* N (factorial (- N 1)))))
  • 6. Example:  Here are some simple example using the if operator:  CL-USER(): (if (> 3 4)"yes“ "no") ANS: "no“
  • 7. Applications of LISP:  Mathematics  Artificial intelligence and natural language processing.  Expert Systems (diagnosis, identification, design )
  • 8. Advantages of LISP:  Common Lisp is :  a general-purpose programming language and an AI language  Common Lisp programs are:  easy to test  easy to maintain (depending on programming style)  intractive
  • 9. Cont…  Provides clear syntax  LISP expressions are case-insensitive.  runtime typing: the programmer need not bother about type declarations  several data types: numbers, strings, arrays, lists, char, symbols etc.
  • 10. Disadvantages of LISP  The major disadvantage is due to the lack of popularity and lack of widespread support and knowledge.  It is relatively hard to find Lisp programmers.
  • 11. What is PROLOG?  PROLOG is a declarative language where programs are expressed in terms of relations.  A program in PROLOG can use logical reasoning to answer questions that can be inferred from the knowledge base.
  • 12. Cont … A Prolog language designed in Europe to support natural language processing. It was created by Alain and Robert 1972 as an alternative to the Lisp programming languages.
  • 13. Conti…  There are three basic stratgies in Prolog: facts, rules, and queries.  A collection of facts and rules which describe some collection of relationships is called a knowledge base.  That is, Prolog programs simply are knowledge bases.
  • 14. Conti… Prolog includes an inference engine, which is a process for reasoning logically about information. The inference engine includes a pattern matcher, which retrieves stored (known) information by matching answers to questions. One important feature of Prolog is find all possible solutions rather than only one.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. PROLOG Example mortal(X) :- man(X) % Xismortal if X is a man. % Socrates is a man man(socrates). and then ask Prolog ?- mortal(socrates). % Is Socrates mortal? and it will immediately tell me yes
  • 22. Applications of PROLOG  Expert systems  Relational queries  Parsing of context free language  Natural language processing  Natural support of pattern-matching
  • 23. Advantages of PROLOG  The language works well for tasks like proving mathematical theorems  It has built-in list handling, very useful for representing sequences, trees, and so on.  It is easy to read and write programs which build structures.
  • 24. Similarities:  One of the similarities that makes these languages unique is their ability to rewrite themselves as the program is running.  In Lisp, the program itself can be treated as data that the program can manipulate.  The both languages are object oriented programming languages.
  • 25. Differences:  The main difference between the two languages is the way problems are described.  In Lisp, the programmer must describe how the computer will solve the problem (chess game).  In Prolog, the developer does not need to describe how, but rules points the program toward the desired results. (medical symptoms).  Prolog is not a general-purpose theorem prover. LISP is a general purpose theorem  PROLOG has many functional languages other than LISP.
  • 27. Arithmetic Operations Point of comparison LISP PROLOG ADD (+2 3) 2+3 SUBTRACT (-5 2) (5-2) MULTIPLICATION (* 3 2) (2*3) DIVISION (/ 6 2) (6/2) BRACES (+3 (* 3 2 ) 4) (3+ (3 *2)
  • 28. Logical operations Point of comparison LISP PROLOG SMALLER (< 3 4 ) True 3<4 yes GREATER (> 3 4 ) NIL 3>4 No Smaller than or equal (< = 3 2) Nil Greater than or equal ( > = 3 2) 3=<2 No true 3>=2 Yes Equal ( = 3 4) Nil 3 =:= 4 no Not Equal ( = 3 4 ) True ( 3 == 4) Yes
  • 29. PROLOG Example  age(john,32).  age(agnes,41).  age(george,72).  age(hiba,2).  age(thomas,25). QUERIES age(hiba,2). agnes(41).