Exercices made in prolog