2) Write me a Prolog program that can answer questions of the form
'which programming languages use semi-colons' and 'which programming languages
are graphical?' or even 'which langauges are both semi-colons and object-oriented?'
The data is shown below.
C | Semi-colons | ||
C++ | Semi-colons | Object-oriented | |
Java | Semi-colons | Object-oriented | Graphical |
Lisp | Parenthesis | List-Oriented | |
Prolog | Periods | Horn-clauses |
3) Recall that the factorial of n is just n * (n-1) *
(n-2) * (n-3) ... * 2 * 1. Write me a lisp function 'fac'
that takes as an argument a positive integer. Fac should return the
factorial of the integer.
(fac 3) -> 6 (fac 5) -> 120