General
Material
Lecture 1
Lecture 2
Lecture 3
Lecture 4
Lecture 5

Solution

%% The head of the list is 0. So, the list obviously contains 0. 
contains_0([0|_]).

%% The head of the list is not 0. Check whether the tail of the list,
%% contains 0.
contains_0([Head|Tail]) :- Head \= 0,
                           contains_0(Tail).
    

Back to the exercise.