Adding Prolog in Coderunner

Re: Adding Prolog in Coderunner

by Bruce Nelson -
Number of replies: 0
Hi Richard,
I tried your sample question, and it works perfectly—thank you very much! However, I’m still encountering a challenge, and I’m unsure whether the issue lies with the Prolog environment or the Prolog question template.

The facts below work okey:
parent(john, mary).
parent(john, tom).

When i add a third fact as shown below, i get an error:
parent(john, mary).
parent(john, tom).
parent(susan, mary).

An error appears on the first fact:
***Run error***

ERROR: Type error: `character_code' expected, found `-1' (an integer)
ERROR: In:
ERROR:   [11] char_code(_9694,-1)
ERROR:   [10] '$in_reply'(-1,'?h') at /usr/lib/swi-prolog/boot/init.pl:1012
As shown below:



Where could the problem be???