|
LISP Database
Q. Create LISP database for the statement: (June 02)
Mohan is a teacher, is married to Reeta and has two children
Rahul and Priya. |
Ans.
(putprop 'Mohan 'teacher 'isa)
(putprop 'Mohan 'Reeta 'married-to)
(putprop 'Mohan '(Rahul Priya) 'children) |
Q. Create LISP database for the statement:
(Dec. 01)
A car has four wheels, one engine, one steering, one
brake pedal can run upto 120km/hour. |
Ans.
(putprop 'car '(four-wheels one-engine one-steering break-pedal)
'has-parts)
(putprop 'car '120km/hour 'speed)
|
Q. Create LISP database for the statement:
(June 01)
A cow has four legs, two eyes, white colour and gives
milk and eats grass. |
Ans.
(putprop 'cow '(four-legs two-eyes) 'has-parts)
(putprop 'cow 'white 'colour)
(putprop 'cow 'milk 'gives)
(putprop 'cow 'grass 'eats)
|
Q. Write LISP statements which assign to a
car red colour, year-of-production as 1998 and make-of-car as
MARUTI (Dec. 00) |
Ans.
(putprop 'car 'red 'colour)
(putprop 'car '1998 'year-of-production)
(putprop 'car 'MARUTI 'make-of-car)
|
|
|