'Prolog Problem. I need help to solve this issue

student(stud04, 'Database', 59).
student(stud04, 'Math 3', 67).
student(stud04, 'Data Structures', 79).

prerequisite('Database', 'Data Warehouses').
prerequisite('Math 2', 'Math 3').
prerequisite('Math 3', 'Math 4').


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source