A homework assignment in Prolog which should be trivial for a person familiar with the language.
Please refer to the document attached for the details.
I have experience programming in Prolog. I think I can make the program you are looking for. However, it is a little string for me that I may not include or and if-then structures; these elements are part of de programming logic.