Both sentences: "the degree of a leaf is 0" and "the degree of a leaf is 1" are correct. The issue here is that they are referred to as two different subjects- Data structure & graph theory. If we interpret it with data_structure(**elements are called nodes**) then it is somewhat a directed graph(hierarchical Tree) so the degree of a leaf is 0 but if we interpret it with graph_theory(**elements are called vertex**) then it is undirected graph so the degree of a leaf is 1.

In this question it is vertex so go with graph_theory definition.