We know that degree of a Polynomial is the highest or the greatest degree of a variable in the polynomial. It indicates the highest exponential power in the polynomial(ignoring the coefficients).
Any constant can be written with a variable with the exponential power of zero.
Here, we have constant term =5.
Polynomial form P(x)=5x0
Hence, the degree of the polynomial 6 is 0.