Thursday, June 18, 2020

A simple Prolog program: facts.pl

Following are some screenshots of a simple Prolog program, that has its knowledge base file, named ' facts.pl ' and the various questions asked to it; and the  answers given by the Prolog engine based on the facts mentioned in the KB (using the SWI Prolog compiler software):




Following is how to compile the file


Following is Error because file was not re-compiled after edit


Following is after re-compilation after edit



No comments:

Post a Comment

47000 has 2 significant figures while 47000.000 has 8 significant figures...why? when both are the same value.

  Significant figures refer to the digits in a measured or calculated value that carry meaningful information about its precision .  They in...