Exercises for learning Prolog